• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validating XML with XSD..problems

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am very new to this, so go slow. What I am trying to do is validate an XML document that is being passed into me as a String. The string is an XML document with a schema used. One of the first steps is to verify the String is a well-formed document using a SAXParser.



What happens next is :

the class I am using has a static initializer:




My XML is lengthy, but the parser is unable to find the first element.

The error is:


Any comments or recommendations would be greatly appreciated.

Russ
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is that your "root" element or is it the first child element of your root element ?

If you could post the first few lines of your XML.

Also, we do have the implementation for a validator in the Wiki section of Javaranch - don't have the URL handy.
Thanks.

- m
 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is my root element.

It would be helpful if you knew the link. There are so many links on this web side I would spend a day looking for it.

Here is the start:


Thanks for taking the time to read my post
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic