src/Gnkw/Http/Resource.php
public function xml($type = 'dom')
	{
		$xml = $this->content;
		$type = trim(strtolower($type));
		switch($type)
		{
			case 'dom':
				$xml = new \DOMDocument();
				$xml->loadXML($this->content);
				break;
			case 'simple':
				$xml = new \SimpleXMLElement($this->content);
				break;
		}

		return $xml;
	}
public function xml($type = 'dom')
	{
		$xml = $this->content;
		$type = trim(strtolower($type));
		switch($type)
		{
			case 'dom':
				$xml = new \DOMDocument();
				$xml->loadXML($this->content);
				break;
			case 'simple':
				$xml = new \SimpleXMLElement($this->content);
				break;
		}

		return $xml;
	}
public function xml ( $ type = 'dom' ) { $ xml = $ this -> content ; $ type = trim ( strtolower ( $ type ) ) ; switch ( $ type ) { case 'dom' : $ xml = new \ DOMDocument ( ) ; $ xml -> loadXML ( $ this -> content ) ; break ; case 'simple' : $ xml = new \ SimpleXMLElement ( $ this -> content ) ; break ; } return $ xml ; }
Return the xml object of the ressource
@param string $type The type of object (dom or simple)
> dom = DOMDocument
> simple = SimpleXMLElement
@return DOMDocument or SimpleXMLElement
Return the xml object of the ressource