code_junkie

How to create a DOM from a User's input in PHP5?

Nov 10th, 2011
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. $dom = new DOMDocument();
  2. $dom->loadXML($xml);
  3.  
  4. $xml = $dom->saveXML();
  5. $xml = substr( $xml, strlen( "<?xml version="1.0"?>" ) );
Add Comment
Please, Sign In to add comment