aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/reader.rs12
-rw-r--r--src/xml/mod.rs2
2 files changed, 9 insertions, 5 deletions
diff --git a/src/reader.rs b/src/reader.rs
index 9eb7c91..93b28af 100644
--- a/src/reader.rs
+++ b/src/reader.rs
@@ -289,7 +289,7 @@ where
} else {
let len =
self.buffer.available_data() - rest.as_bytes().len();
- let comment = comment.to_string();
+ let comment = comment.0.to_string();
self.buffer.consume(len);
return Ok(Content::Comment(comment));
}
@@ -351,7 +351,7 @@ where
}
xml::ContentItem::Comment(comment) => {
let len = self.buffer.available_data() - rest.as_bytes().len();
- let comment = comment.to_string();
+ let comment = comment.0.to_string();
self.buffer.consume(len);
return Ok(Content::Comment(comment));
}
@@ -388,7 +388,7 @@ impl<R> Reader<R> {
}) {
let prefix = match prefix {
xml::NSAttName::PrefixedAttName(prefixed_att_name) => {
- Some(prefixed_att_name.to_string())
+ Some(prefixed_att_name.0.to_string())
}
xml::NSAttName::DefaultAttName => None,
};
@@ -408,6 +408,10 @@ impl<R> Reader<R> {
.chain(element_namespace_declarations.iter())
.collect();
+ trace!(
+ "namespace declaration stack: {:?}",
+ namespace_declarations_stack
+ );
// element name
let element_namespace_declaration;
@@ -571,7 +575,7 @@ impl<R> Reader<R> {
}) {
let prefix = match prefix {
xml::NSAttName::PrefixedAttName(prefixed_att_name) => {
- Some(prefixed_att_name.to_string())
+ Some(prefixed_att_name.0.to_string())
}
xml::NSAttName::DefaultAttName => None,
};
diff --git a/src/xml/mod.rs b/src/xml/mod.rs
index b0d9056..005a122 100644
--- a/src/xml/mod.rs
+++ b/src/xml/mod.rs
@@ -328,7 +328,7 @@ impl<'s> Deref for CharData<'s> {
/// [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
#[derive(Clone, Debug, PartialEq, Eq)]
#[repr(transparent)]
-pub struct Comment<'s>(&'s str);
+pub struct Comment<'s>(pub(crate) &'s str);
impl<'s> Deref for Comment<'s> {
type Target = &'s str;