javaxmljaxbwoodstox

Architecture of system


I am a newbie in Java and I have a unique requirement. I am getting xml data from client and I had already defined schema with me. Now, the problem is client side xml has many more element than schema I have. How to deal with it? Further, there are some elements which have different architecture then what is defined in schema, I want to transform it into form of what schema has. Does it sound wrong since schema is generally there for validating? Can someone give me overview of how to deal with the problem with small example?


Solution

  • The purpose of an XML schema is to describe the structure of a set of XML documents. If your client is sending XML which does not conform to your schema, then one of three things must be true:

    Is this helpful? I'd say first and foremost, you need to work out what role your XML schema is performing in your system, and that's a design task you should do before you start writing any code.