Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~498 People Reached
Favorite Forums
Favorite Tags
Member Avatar for softwareconsl

<?php $string = <<<XML <a> <b> <c>text</c> <c>stuff</c> </b> <d> <c>code</c> </d> </a> XML; $xml = new SimpleXMLElement($string); echo $xml->asXML(); $result = $xml->xpath('/a/b/c'); while(list( ,$node) = each($result)) { echo $node->asXML($result); } need this output: <c>text</c> <c>stuff</c> <>code</c>

Member Avatar for briele
0
238
Member Avatar for briele

how to retrieve particular node.. i.e., if b node had value like <b id="1"> means it will return b's child nodes.. output must be: <c>text</c> <c>stuff</c> Here is my code: <?php $string = <<<XML <a> <b> <c>text</c> <c>stuff</c> </b> <b id="1"> <c>code</c> </b> <d> <c>item</c> </d> </a> XML; $xml = …

Member Avatar for briele
0
260