Using DOM XML, PHP 4.0.4pl1, I process a retrieved XML document into a family of parent/children.
The XML document:
<Elem1> // text content
<Elem2> // text content
<Elem3> // text content
<Elem4> // elements content
<Prop1> // text content
<Prop2> // text content
<Prop3> // text content
<Prop4> // elements content if any children
<Elem4> // parent like the root Elem4
<Elem5> // text content
Do to the nature and use of the family, I need to create an object called familyObj, where each child is a parent in itself with properties of the XML document and methods to retrieve them.
My problem is, that I can't access the methods of DOM XML from inside the familyObj and therefore not get the properties of each XML element.
// load xml doc
$xmldoc = xmldoc( $xmlrtn);
// get root node
$root = $xmldoc->root();
// get root elements
$rootElements = $root->children();
// instance of family
$familyObj = new family( $rootElements);
How do I get the properties and methods of the DOM XML available in familyObj?