THOR
09-05-2002, 05:50 AM
i am by no means a programmer, but i am trying to learn how to use xml with flash as well as using php to write to an xml file, but i have run into a problem
using an xml and flash book I have, i created this function
function submit(person, body_text, header){
text="<" +person+ ">" + "<date>" + date + "</date>" + "<header>" +"<![CDATA[" + header + "]]>" + "</header>" + "<body><![CDATA[" + body_text + "]]></body>" + "</" +person+ ">";
xmlText= new XML(text);
trace(xmlText.toString());
}
when called it grabs text from input boxes, and places them within the text variable creating xml, which works well when
trace(text); //looks just like xml when traced
but when I change "text" into xml as seen by
xmlText=new XML(text);
it picks up an Object prototype i used for other purposes. not even involved in the function.
hopefully this is readable, and I am making sense
any help would be great,
using an xml and flash book I have, i created this function
function submit(person, body_text, header){
text="<" +person+ ">" + "<date>" + date + "</date>" + "<header>" +"<![CDATA[" + header + "]]>" + "</header>" + "<body><![CDATA[" + body_text + "]]></body>" + "</" +person+ ">";
xmlText= new XML(text);
trace(xmlText.toString());
}
when called it grabs text from input boxes, and places them within the text variable creating xml, which works well when
trace(text); //looks just like xml when traced
but when I change "text" into xml as seen by
xmlText=new XML(text);
it picks up an Object prototype i used for other purposes. not even involved in the function.
hopefully this is readable, and I am making sense
any help would be great,