in reply to Re^3: copy XML elements from one file to another
in thread copy XML elements from one file to another

Thanks again for the help but unfortunately I only got the following in my output file when using $new->toFile('fileName')
<?xml version="1.0" encoding="utf-8"?>
I have tried this before reading your reply. But I got the same result. printing my results did help a bit just for debugging purposes. Also tried piping my print statements to a file but the formatting was not good and the text was from bottom to top
I just need to get this step done by seeing a nice formatted output so I can start playing around with the code and get what I want. Thanks again

  • Comment on Re^4: copy XML elements from one file to another

Replies are listed 'Best First'.
Re^5: copy XML elements from one file to another
by tangent (Parson) on Nov 25, 2013 at 23:46 UTC
    I only got the following in my output file...
    <?xml version="1.0" encoding="utf-8"?>
    Did you include the line $new->addChild($features); ?
    a nice formatted output
    Did you include the format argument 2 in $new->toFile($filename,2) ? You can also print $new->toString(2) when debugging.