Validate only a subset of a document

Discussion in 'XML' started by user@domain.invalid, Jul 20, 2004.

  1. Guest

    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
     
    , Jul 20, 2004
    #1
    1. Advertising

  2. wooks Guest

    lid wrote in message news:<B23Lc.37$>...
    > 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
     
    wooks, Jul 23, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QW5kcmU=?=

    Forms-Based Authentication for only a subset of pages

    =?Utf-8?B?QW5kcmU=?=, Dec 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    375
    =?Utf-8?B?QW5kcmU=?=
    Dec 30, 2004
  2. =?ISO-8859-1?Q?Antonio_Ruiz_Mart=EDnez?=

    validate a document or element against a schema

    =?ISO-8859-1?Q?Antonio_Ruiz_Mart=EDnez?=, Jan 13, 2005, in forum: Java
    Replies:
    0
    Views:
    318
    =?ISO-8859-1?Q?Antonio_Ruiz_Mart=EDnez?=
    Jan 13, 2005
  3. Replies:
    2
    Views:
    254
  4. Replies:
    1
    Views:
    109
    wooks
    Jul 23, 2004
  5. marc
    Replies:
    7
    Views:
    84
Loading...

Share This Page