public static UNode parseXML ( Reader reader ) throws IllegalArgumentException { assert reader != null ; // This throws if the XML is malformed. Element rootElem = Utils . parseXMLDocument ( reader ) ; // Parse the root element and ensure it elligible as a map. UNode rootNode = parseXMLElement ( rootElem ) ; return rootNode ; }
Parse XML from the given Reader and return the appropriate UNode object . The UNode returned is a MAP whose child nodes are built from the attributes and child elements of the document s root element .