xacro.xmlutils module

xacro.xmlutils.attribute(tag, a)

Helper function to fetch a single attribute value from tag :param tag (xml.dom.Element): DOM element node :param a (str): attribute name :return: attribute value if present, otherwise None

xacro.xmlutils.first_child_element(elt)
xacro.xmlutils.fixed_writexml(self, writer, indent='', addindent='', newl='')
xacro.xmlutils.next_sibling_element(node)
xacro.xmlutils.opt_attrs(tag, attrs)

Helper routine for fetching optional tag attributes :param tag (xml.dom.Element): DOM element node :param attrs [str]: list of attributes to fetch

xacro.xmlutils.replace_node(node, by, content_only=False)
xacro.xmlutils.reqd_attrs(tag, attrs)

Helper routine for fetching required tag attributes :param tag (xml.dom.Element): DOM element node :param attrs [str]: list of attributes to fetch :raise RuntimeError: if required attribute is missing