Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Xerces, Oracle or Sun TR2

 
Jay X Brown
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which parser is recommended for basic e-com application handling user registration and sign-in and passing on such information to partner sites?
Would appreciate an answer?
Yes'm, I showr woooould!
Jay
 
Jay X Brown
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or none of the above.
Brett McLaughlin says (http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-validation3_p.html)
The key to the entire schemaParser class is being able to (no surprise here) actually parse an XML schema. Many XML parsers, such as Apache Xerces, currently offer options for schema validation; however, you do not want to use those facilities. In fact, you don't want the XML schema to be handled as a schema at all. That is because all parsers, at least in their current versions, use vendor-specific structures for handling XML schemas. The result is nonportable code, the enemy of any Java programmer.
Instead, the schemaParser class can rely on the fact that an XML schema document is actually an XML document as well. It conforms to XML's well-formedness rules and, therefore, can be treated as any other XML document. Therefore, the schema parser can read in the XML schema as an XML document and operate on it as it would any other document with which it works. That is exactly what the parseschema() method does.
----
What say the gurus of JavaRanch?
Jay
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would think, that in the presence of an XML document and a corresponding XML Schema, one should parse the schema with the validation turned off, and the XML document with the validation turned on.

------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic