NickZA
June 29th, 2007, 05:04 AM
Hi
I'm a little confused about using XMLparse.
I'm making use of Zinc to write out to an XML file, but I don't know if it is actually necessary to parse the XML before writing the characters out to file... :h:
Because it seems to me like it'll make no difference whatsoever -- I can send out the XML unparsed, and as long as I do it right, there'll be no errors, right? It'll be just the same?
Perhaps there's something I don't understand here - if so please clarify for me.
I found an article at http://www.communitymx.com/content/article.cfm?cid=107B6 with the following code showing how it's done, but it looks as if I could just put the string in directly since it simply converts the XML object to a string anyway...? Here is the code:
import mdm.FileSystem;
var xml:XML = new XML();
xml.parseXML("<data>sample data</data>");
var filePath:String = FileSystem.getCurrentDir() + "sample.xml";
FileSystem.saveFile(filePath, xml.toString());Thank you. Here is a spotted egg for your trouble. :egg:
-Nick
I'm a little confused about using XMLparse.
I'm making use of Zinc to write out to an XML file, but I don't know if it is actually necessary to parse the XML before writing the characters out to file... :h:
Because it seems to me like it'll make no difference whatsoever -- I can send out the XML unparsed, and as long as I do it right, there'll be no errors, right? It'll be just the same?
Perhaps there's something I don't understand here - if so please clarify for me.
I found an article at http://www.communitymx.com/content/article.cfm?cid=107B6 with the following code showing how it's done, but it looks as if I could just put the string in directly since it simply converts the XML object to a string anyway...? Here is the code:
import mdm.FileSystem;
var xml:XML = new XML();
xml.parseXML("<data>sample data</data>");
var filePath:String = FileSystem.getCurrentDir() + "sample.xml";
FileSystem.saveFile(filePath, xml.toString());Thank you. Here is a spotted egg for your trouble. :egg:
-Nick