You are here:  » Editing XML files


Editing XML files

Submitted by dustin on Tue, 2006-03-07 18:15 in
Submitted by support on Tue, 2006-03-07 19:17

Hi,

I'm afraid there are no editing or writing features in Magic Parser. If you want to create XML using PHP then it is normally just a case of issuing the appropriate headers and generating the XML content using the standard output features; for example:

<?php
  header
("Content-Type: text/xml");
  print 
"<example>";
  print 
"<foo>bar</foo>";
  print 
"</example>";
?>

For actual editing of XML files you would need to look at a DOM based interface which provide functions for creating and editing nodes. Check here for more information on PHP's DOM based XML interface:

http://www.php.net/manual/en/ref.dom.php