XML File Issue

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


1 point

I have following XML file.

2010-04-01
12345

Tony

CA, US


6187
Book


122
DVD

My XML file is not validating correctly? What could be the problem?



0 points

Sorry posting my xml again:

<purchase-order>
	<date>2010-04-01</date>
	<number>12345</number>
<purchased-by>
		<name>Tony</name>
<address>CA, US</address>
</purchased-by>
	<order-items></order-items>
		<item>
			<id>6187</id>
			<type>Book</type>
			<label>Some book</label>
		</item>		<item>
                 <id>122</id>
			<type>DVD</type>
			<label>Some video</label>
		</item>
 
</Purchase-order>

Anonymous's picture
Created by Anonymous
-13 points

Never mind. XML tags are case-sensitive: <purchase-order> is not same as </purchase-order>

Anonymous's picture
Created by Anonymous
-1 points

Validate your XML from here: http://www.w3schools.com/xml/xml_validator.asp

Tony

Anonymous's picture
Created by Anonymous

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.