Functions
xacro.xmlutils Namespace Reference

Functions

def attribute (tag, a)
 
def check_attrs (tag, required, optional)
 
def first_child_element (elt)
 
def fixed_writexml (self, writer, indent="", addindent="", newl="")
 
def next_sibling_element (node)
 
def opt_attrs (tag, attrs)
 
def replace_node (node, by, content_only=False)
 
def reqd_attrs (tag, attrs)
 

Function Documentation

def 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

Definition at line 72 of file xmlutils.py.

def xacro.xmlutils.check_attrs (   tag,
  required,
  optional 
)
Helper routine to fetch required and optional attributes
and complain about any additional attributes.
:param tag (xml.dom.Element): DOM element node
:param required [str]: list of required attributes
:param optional [str]: list of optional attributes

Definition at line 110 of file xmlutils.py.

def xacro.xmlutils.first_child_element (   elt)

Definition at line 36 of file xmlutils.py.

def xacro.xmlutils.fixed_writexml (   self,
  writer,
  indent = "",
  addindent = "",
  newl = "" 
)

Definition at line 129 of file xmlutils.py.

def xacro.xmlutils.next_sibling_element (   node)

Definition at line 43 of file xmlutils.py.

def 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

Definition at line 87 of file xmlutils.py.

def xacro.xmlutils.replace_node (   node,
  by,
  content_only = False 
)

Definition at line 50 of file xmlutils.py.

def 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

Definition at line 96 of file xmlutils.py.



xacro
Author(s): Stuart Glaser, William Woodall, Robert Haschke
autogenerated on Sat Jun 8 2019 18:04:14