twfurst Posted May 28, 2010 Share Posted May 28, 2010 Hello, I am in the process of writing many XML files (416) from info on a MySQL Db. I have been sucessful in everything except for getting the following at the beginning of the file: <!DOCTYPE dmodule [ <!NOTATION png PUBLIC "pngviewer.exe"> <!NOTATION jpg PUBLIC "jpgviewer.exe"> <!ENTITY SYSTEM "./Illustrations/$filename.jpg" NDATA jpg> ]> I have been using the DOMDocument functions within PHP to write the remainder of the file, with pretty good success. I am not sure how to get this information placed before the "root" element. Any help would be greatly appreciated. I would post the complete PHP script that I have thus far, but it is 850 lines long, and at work. Thanks Link to comment https://forums.phpfreaks.com/topic/203156-creating/ Share on other sites More sharing options...
cags Posted May 29, 2010 Share Posted May 29, 2010 You should be able to use the saveXML function to save the value into a variable. Then simple write the info you want to a file with something like fwrite, followed by writing the value returned by saveXML. Link to comment https://forums.phpfreaks.com/topic/203156-creating/#findComment-1064961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.