Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><document>
- <node id="n0">
- <data key="d6">
- <y:GenericNode configuration="TEXT I WANT TO GET">
- <y:Geometry height="56.030557066666574" width="181.68810666666667" x="638.4599149206349" y="143.24969103333325"/>
- <y:Fill color="#FFCC66" color2="#FF9900" transparent="false"/>
- <y:BorderStyle color="#000000" type="line" width="1.0"/>
- <y:NodeLabel alignment="center" autoSizePolicy="node_width" configuration="CroppingLabel" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.265625" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="181.68810666666667" x="0.0" y="10.882466033333287">Text I want to Get<y:LabelModel>
- <y:SmartNodeLabelModel distance="4.0"/>
- </y:LabelModel>
- <y:ModelParameter>
- <y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="0.0" nodeRatioX="-0.5" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
- </y:ModelParameter>
- </y:NodeLabel>
- </y:GenericNode>
- </data>
- </node>
- <?php
- $xml = simplexml_load_file("testxml.xml")
- or die("Error: Cannot create object - check that the XML file exists and is
- not corrupted"); print_r($xml);
- echo $xml->node[0]['id']; // This works
- echo $xml->node[0]->data[0]['key']; // This works
- echo $xml->children('y', true)->GenericNode->attributes()->configuration; // Nothing
- echo $xml->children('y', true)->GenericNode->NodeLabel; // Nothing
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement