trishtren
03-25-2012, 11:59 AM
Hello,
iv been working on a data application using xml, but when i try to validate it and load it into actionscript it fails. Although this is in large part an XML problem im hoping someone can shed light on it, as every other forum iv tried no one ever replies :p.
Im using an xml file and external dtd and when i load it into actionscript i am present with the error :
XML Declaration not well formed
Extra content at the end of the document.
The DTD is as follows:
<?xml encoding="UTF-8"?>
<!ELEMENT Sword (Damage,Accuracy,Range)>
<!ELEMENT Damage(#PCDATA)>
<!ELEMENT Accuracy(#PCDATA)>
<!ELEMENT Range(#PCDATA)>
<!ATTLIST Sword Name CDATA #IMPLIED>
The XML is valid and well formatted, which is why i am confused of the error i recieve.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Module SYSTEM "sword.dtd">
<Sword Name="cleaver">
<Damage>4</Damage>
<Accuracy>10</Accuracy>
<Range>5</Range>
</Sword>
Any help finding why i receive these errors from my dtd would be helpful as evey xml forum seems dead.
The file works perfectly if i use an internal dtd however i was planning to just reuse the dtd and thats why i am trying an external, so any help figuring this one out :)
iv been working on a data application using xml, but when i try to validate it and load it into actionscript it fails. Although this is in large part an XML problem im hoping someone can shed light on it, as every other forum iv tried no one ever replies :p.
Im using an xml file and external dtd and when i load it into actionscript i am present with the error :
XML Declaration not well formed
Extra content at the end of the document.
The DTD is as follows:
<?xml encoding="UTF-8"?>
<!ELEMENT Sword (Damage,Accuracy,Range)>
<!ELEMENT Damage(#PCDATA)>
<!ELEMENT Accuracy(#PCDATA)>
<!ELEMENT Range(#PCDATA)>
<!ATTLIST Sword Name CDATA #IMPLIED>
The XML is valid and well formatted, which is why i am confused of the error i recieve.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Module SYSTEM "sword.dtd">
<Sword Name="cleaver">
<Damage>4</Damage>
<Accuracy>10</Accuracy>
<Range>5</Range>
</Sword>
Any help finding why i receive these errors from my dtd would be helpful as evey xml forum seems dead.
The file works perfectly if i use an internal dtd however i was planning to just reuse the dtd and thats why i am trying an external, so any help figuring this one out :)