src/Thybag/SharePointAPI.php
private function getArrayFromElementsByTagName ($rawXml, $tag, $namespace = NULL) {
		// Get DOM instance and load XML
		$dom = new \DOMDocument();

		$dom->loadXML($rawXml, (LIBXML_VERSION >= 20900) ? LIBXML_PARSEHUGE : null);

		// Is namespace set?
		if (!is_null($namespace)) {
			// Use it
			$nodes = $dom->getElementsByTagNameNS($tag, $namespace);
		} else {
			// Get nodes
			$nodes = $dom->getElementsByTagName($tag);
		}

		// Return nodes list
		return $nodes;
	}
private function getArrayFromElementsByTagName ($rawXml, $tag, $namespace = NULL) {
		// Get DOM instance and load XML
		$dom = new \DOMDocument();

		$dom->loadXML($rawXml, (LIBXML_VERSION >= 20900) ? LIBXML_PARSEHUGE : null);

		// Is namespace set?
		if (!is_null($namespace)) {
			// Use it
			$nodes = $dom->getElementsByTagNameNS($tag, $namespace);
		} else {
			// Get nodes
			$nodes = $dom->getElementsByTagName($tag);
		}

		// Return nodes list
		return $nodes;
	}
private function getArrayFromElementsByTagName ( $ rawXml , $ tag , $ namespace = NULL ) { // Get DOM instance and load XML $ dom = new \ DOMDocument ( ) ; $ dom -> loadXML ( $ rawXml , ( LIBXML_VERSION >= 20900 ) ? LIBXML_PARSEHUGE : null ) ; // Is namespace set? if ( ! is_null ( $ namespace ) ) { // Use it $ nodes = $ dom -> getElementsByTagNameNS ( $ tag , $ namespace ) ; } else { // Get nodes $ nodes = $ dom -> getElementsByTagName ( $ tag ) ; } // Return nodes list return $ nodes ; }
"Getter" for an array of nodes from given "raw XML" and tag name

@param	string	$rawXml		"Raw XML" data
@param	string	$tag		Name of tag
@param	string	$namespace	Optional namespace
@return	array	$nodes		An array of XML nodes
Getter for an array of nodes from given raw XML and tag name