Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Validate only a subset of a document

Reply
Thread Tools

Validate only a subset of a document

 
 
user@domain.invalid
Guest
Posts: n/a
 
      07-20-2004
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

 
Reply With Quote
 
 
 
 
wooks
Guest
Posts: n/a
 
      07-23-2004
http://www.velocityreviews.com/forums/(E-Mail Removed)d wrote in message news:<B23Lc.37$(E-Mail Removed)>...
> 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=&...oogle%2BSearch
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Permitting access to only a subset of the public methods fgh.vbn.rty@gmail.com C++ 2 07-17-2008 06:42 PM
Getting Elements and Contents of a subset of the Document marc Javascript 7 04-20-2006 02:26 PM
validate a document or element against a schema =?ISO-8859-1?Q?Antonio_Ruiz_Mart=EDnez?= Java 0 01-13-2005 11:01 AM
Forms-Based Authentication for only a subset of pages =?Utf-8?B?QW5kcmU=?= ASP .Net 2 12-30-2004 04:33 PM
Validate only a subset of a document user@domain.invalid XML 1 07-23-2004 11:16 AM



Advertisments