php - SimpleXMLElement Object back to XML -


this question has answer here:

let's you're getting following response api call:

[orderarray] => simplexmlelement object     (         [order] => array             (                 [0] => simplexmlelement object                     (                         [orderid] => etc...etc..<br> 

how go converting well-formatted xml can save each of order arrays own separate file? (please don't ask me why have perform seemingly futile task.)

$sxml simplexmlelement

$doc = new domdocument(); $doc->formatoutput = true; $doc->loadxml($sxml->asxml()); $xml = $doc->savexml(); 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -