Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : SimpleXML functions : SimpleXMLElement->__construct()

SimpleXMLElement->__construct()

Creates a new SimpleXMLElement object ()

Example 2253. Create a SimpleXMLElement object

<?php

include 'example.php';

$sxe = new SimpleXMLElement($xmlstr);
echo
$sxe->movie[0]->title;

?>

Example 2254. Create a SimpleXMLElement object from a URL

<?php

$sxe
= new SimpleXMLElement('http://example.org/document.xml', NULL, TRUE);
echo
$sxe->asXML();

?>

Related Examples ( Source code ) » simplexml element construct













Change Language


Follow Navioo On Twitter
SimpleXMLElement->addAttribute()
SimpleXMLElement->addChild()
SimpleXMLElement->asXML()
SimpleXMLElement->attributes()
SimpleXMLElement->children()
SimpleXMLElement->__construct()
SimpleXMLElement->getDocNamespaces()
SimpleXMLElement->getName()
SimpleXMLElement->getNamespaces()
SimpleXMLElement->registerXPathNamespace()
SimpleXMLElement->xpath()
simplexml_import_dom
simplexml_load_file
simplexml_load_string
eXTReMe Tracker