Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validating only part of xml using schema

 
Arun Prasath
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic