/** * <p> * </p> * @param mixed $xml either a string representing an <tt>XML</tt> data * structure or an <tt>.xml</tt> file. * @return XMLElement the <code>XMLElement</code>. */ public static function parse($xml, $section = null) { $parser = new XMLParser($xml); if (is_string($section) && !empty($section)) { return $parser->getXml()->get($section, true); } return $parser->getXml(); }