summaryrefslogtreecommitdiff
path: root/src/xml
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-02-25 20:36:06 +0100
committerHampusM <hampus@hampusmat.com>2023-02-25 20:36:06 +0100
commite225d7344cef05f03676f6579415999478328ead (patch)
tree1ba58a8920c86d157fc9faa0e2c2739dc8d2b605 /src/xml
parent5a00534bd4c0a44d063c592a471b8b546f1b5925 (diff)
feat: add variable list support
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/element.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/xml/element.rs b/src/xml/element.rs
index 647fe90..b778dac 100644
--- a/src/xml/element.rs
+++ b/src/xml/element.rs
@@ -44,6 +44,17 @@ impl Elements
})
}
+ pub fn get_all_tagged_elements(&self) -> Vec<&Tagged>
+ {
+ self.elements
+ .iter()
+ .filter_map(|element| match element {
+ Element::Tagged(tagged_element) => Some(tagged_element),
+ _ => None,
+ })
+ .collect()
+ }
+
pub fn get_all_tagged_elements_with_name(&self, tag_name: &str) -> Vec<&Tagged>
{
self.elements