minidom: Allow passing prefixes alongside a reader
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
3992c1d4f4
commit
93174f97ec
2 changed files with 40 additions and 0 deletions
|
|
@ -29,6 +29,15 @@ impl TreeBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
/// Allow setting prefixes stack.
|
||||
///
|
||||
/// Useful to provide knowledge of namespaces that would have been declared on parent elements
|
||||
/// not present in the reader.
|
||||
pub fn with_prefixes_stack(mut self, prefixes_stack: Vec<Prefixes>) -> Self {
|
||||
self.prefixes_stack = prefixes_stack;
|
||||
self
|
||||
}
|
||||
|
||||
/// Stack depth
|
||||
pub fn depth(&self) -> usize {
|
||||
self.stack.len()
|
||||
|
|
|
|||
Loading…
Reference in a new issue