Newbie, Adding DTD to XML.

admin

Administrator
Staff member
I been using XML for a while now. Using Javascript, I created a function that parses data from the XML then send it to the Flash application via swfobect.
Everything works fine, but now I want to add a DTD to my XML file. When I do that, the data parsed becomes undefined. Taking it out makes it work. I tried putting in a blank DTD and also tried putting ELEMENTS in their to and still get the same results. Basically I can only get XML files to parse that dont have DTD's in my situation. Heres an example of some code. The function call, and what my XML would look like.

Javascript code:
function ChangeTextMode()
{
var so = new SWFObject("../Flash/textscrollCom5.swf", "mymovie", "500", "300", "8", "#000000");

so.addVariable("sSwfText", xmlDoc.getElementsByTagName("blog")[0].childNodes[0].nodeValue);
so.write("flashcontent");
}

XML code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE text [

]>
<text>
<info>
<music>music/fft3.mp3</music>
<image>images/fft_cover.jpg"</image>
<boxartwidth>100 </boxartwidth>
<boxartheight>150 </boxartheight>
<length>110</length>
<date>9/19/07</date>
</info>
</text>
 
Back
Top