Home > Archive > PERL Miscellaneous > July 2004 > Validate only a subset of a document
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Validate only a subset of a document
|
|
| user@domain.invalid 2004-07-20, 3:56 am |
| 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
| |
|
| user@domain.invalid wrote in message news:<B23Lc.37$Iu3.107@news.oracle.com>...
> 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=...Google%2BSearch
|
|
|
|
|