Validate only a subset of a document

U

user

Hi,

I am fairly new to XML, and would like some pointers on the following :

I need to validate a _part_ of an xml file with a schema, and do not
care what is there above/below that chunk. I will be using Perl for this.

The approach I can think of would be to validate against a schema with
everything above/below the required part as optional.

Or, I could parse the XML, extract that into a temporary file so that
the required xml is now a root node, and validate with a schema
containing only information related to that.

However, I was just wondering if there is any other simpler way to do it
(with Perl)? I have heard og XPath and the XML::Twig modules, but am not
sure if those will make my design simpler or more complex ?

Suggestions ?

TIA
Am
 
W

wooks

Hi,

I am fairly new to XML, and would like some pointers on the following :

I need to validate a _part_ of an xml file with a schema, and do not
care what is there above/below that chunk. I will be using Perl for this.

The approach I can think of would be to validate against a schema with
everything above/below the required part as optional.

Or, I could parse the XML, extract that into a temporary file so that
the required xml is now a root node, and validate with a schema
containing only information related to that.

However, I was just wondering if there is any other simpler way to do it
(with Perl)? I have heard og XPath and the XML::Twig modules, but am not
sure if those will make my design simpler or more complex ?

Suggestions ?

TIA
Am


http://groups.google.com/groups?dq=...mp.text.xml&ie=UTF-8&hl=en&btnG=Google+Search
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top