This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unknown root element SAX error  RSS feed

 
vamshi chitti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone tell me what exactly means "Unknown root element" while parsing xml.

thankyou
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A search for that error message only brings up a few hits, one of which is this post. Are you sure you have that error correct? Can you show us the whole stack trace?
It sounds like your XML document is not well-formed. Can you show us the document? If it is large, how about a small sample that gives the same error.
 
vamshi chitti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..thank you for your reply.

my xsd is
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.valuemomentum.com/plcm">
<element name="address">
<complexType>
<sequence>
<element name="city" type="string"/>
<element name="zipcode" type="integer"/>
</sequence>
<attribute name="id" type="ID"/>
</complexType>
</element>
</schema>

and xml is
<?xml version="1.0" encoding="UTF-8"?>
<address xmlns ="http:// http://www.valuemomentum.com/plcm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:// http://www.valuemomentum.com/plcm address.xsd ">
<city>Hyderabad</city>
<zipcode>0</zipcode>
</address>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!