Hi. I am a java programmer just learning to write files in xml. I am creating an xml file in my java program. When I go to XMLspy to look at the file, it has the error message that it is not well formed. The code as it looks in xmlspy is below:
<!DOCTYPE ORDER [
<!ELEMENT ORDER (ORDERDETAIL)*>
<!ELEMENT ORDERDETAIL (ORDERID, PRODUCTID, UNITPRICE, QUANTITY, DISCOUNT)>
<!ELEMENT ORDERID (#PCDATA)>
<!ELEMENT PRODUCTID (#PCDATA)>
<!ELEMENT UNITPRICE (#PCDATA)>
<!ELEMENT QUANTITY (#PCDATA)>
<!ELEMENT DISCOUNT (#PCDATA)>
]>
The error message when I try to validate it in xmlspy says it is not well formed and that a <!-- is expected. The cursor is placed after the ]>.
I have spent quite some time trying to figure out what the problem is. I have a very similar file that works just fine and I can't see the difference in the code other than the element names.
Any help is greatly appreciated.
<!DOCTYPE ORDER [
<!ELEMENT ORDER (ORDERDETAIL)*>
<!ELEMENT ORDERDETAIL (ORDERID, PRODUCTID, UNITPRICE, QUANTITY, DISCOUNT)>
<!ELEMENT ORDERID (#PCDATA)>
<!ELEMENT PRODUCTID (#PCDATA)>
<!ELEMENT UNITPRICE (#PCDATA)>
<!ELEMENT QUANTITY (#PCDATA)>
<!ELEMENT DISCOUNT (#PCDATA)>
]>
The error message when I try to validate it in xmlspy says it is not well formed and that a <!-- is expected. The cursor is placed after the ]>.
I have spent quite some time trying to figure out what the problem is. I have a very similar file that works just fine and I can't see the difference in the code other than the element names.
Any help is greatly appreciated.