wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Validating only part of xml using schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Validating only part of xml using schema" Watch "Validating only part of xml using schema" New topic
Author

Validating only part of xml using schema

Arun Prasath
Ranch Hand

Joined: Sep 17, 2003
Posts: 192
Hi,
can I validate only child elements of xml against xml schema?

considering following xml:
<root>
<details>
...
...
</details>
<details>
...
</details>
<details>
...
</details>
<details>
...
</details>
</root>

I would like to validate only contents of <details></details> against a schema. Is this possible?

thanks in advance for your help.
s.arun prasath


SCJP 1.4, SCDJWS , SCJA<br />I can do ALL things through CHRIST who strengthens me.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
I would like to validate only contents of <details></details> against a schema. Is this possible?


Depends on how you define the schema.
I maybe missing something here....

- m
Arun Prasath
Ranch Hand

Joined: Sep 17, 2003
Posts: 192
sorry for not being clear.
my requirement is to get only <details>...</details> and then apply schema on it.

The reason why I need it separately is, if validation fails for one <details>..</details>, then I should be able to take the next <details> element and then proceed with processing it.

If I have the schema applied over whole document, (<root>..</root> ) , if it fails for any <details>, then I wont be able to pick up the correct <details> ones..

thanks again
[ November 04, 2004: Message edited by: Arun Prasath ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validating only part of xml using schema
 
Similar Threads
Help me for xsd creation
validating xml file against a specific schema using jaxp sax parser
Whiz Labs question error
Unable to validate XML against the schema
apply- templates!!!!!!!!