diff --git a/repos/os/include/util/xml_node.h b/repos/os/include/util/xml_node.h index a5e86a98d4..6c0a0feebd 100644 --- a/repos/os/include/util/xml_node.h +++ b/repos/os/include/util/xml_node.h @@ -21,6 +21,7 @@ namespace Genode { class Xml_attribute; class Xml_node; + } @@ -104,6 +105,10 @@ class Genode::Xml_attribute strncpy(dst, _name.start(), max_len); } + typedef String<64> Name; + Name name() const { + return Name(_name.start(), _name.len()); } + /** * Return true if attribute has specified type */ @@ -607,6 +612,13 @@ class Genode::Xml_node void type_name(char *dst, size_t max_len) const { _start_tag.name().string(dst, max_len); } + typedef String<64> Type; + Type type() const + { + Token name = _start_tag.name(); + return Type(name.start(), name.len()); + } + /** * Return true if tag is of specified type */