childElement function

XmlElement childElement(
  1. XmlElement elem,
  2. String tagName
)

Implementation

XmlElement childElement(XmlElement elem, String tagName) {
  for (XmlNode node in elem.children) {
    if(node is XmlElement&& node.name.local == tagName) {
      return node;
    }
  }
  return null;
}