XML parsers

Discussion in 'XML' started by Manu Stanley, Dec 24, 2004.

  1. Manu Stanley

    Manu Stanley Guest

    I am trying to validate simple xml documents against a given/external
    DTD. Can someone help me identify a method for the same if I wish I
    could select a folder full of *.xml files and run the utility? Even a
    parser that has the feature to check the form and validate a folder
    full of *.xml files will do.

    Thanks

    Manusmriti.
    Manu Stanley, Dec 24, 2004
    #1
    1. Advertising

  2. Manu Stanley wrote:

    > I am trying to validate simple xml documents against a given/external
    > DTD. Can someone help me identify a method for the same if I wish I
    > could select a folder full of *.xml files and run the utility?


    Tools like xmllint validate one file at a time.
    If you want to validate several files, you should
    invoke xmllint several times; once for each file.
    =?ISO-8859-1?Q?J=FCrgen_Kahrs?=, Dec 24, 2004
    #2
    1. Advertising

  3. Manu Stanley

    Peter Flynn Guest

    Manu Stanley wrote:

    > I am trying to validate simple xml documents against a given/external
    > DTD. Can someone help me identify a method for the same if I wish I
    > could select a folder full of *.xml files and run the utility? Even a
    > parser that has the feature to check the form and validate a folder
    > full of *.xml files will do.


    Download and install a standalone XML parser like nsgmls or rxp.
    Then either write a script which feeds the filenames from the
    directory to the parser one at a time, or use a command like

    $ cd mydirectory
    $ for f in *.xml; do rxp $f; done

    If you're using a non-Unix-like system (eg Microsoft Windows) you can
    either install a Unix-shell processor like Cygwin to do this, or there
    may be some looping feature in DOS batch files which will do it.

    ///Peter
    --
    "The cat in the box is both a wave and a particle"
    -- Terry Pratchett, introducing quantum physics in _The Authentic Cat_
    Peter Flynn, Dec 31, 2004
    #3
    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. Replies:
    1
    Views:
    693
    Esmond Pitt
    Mar 27, 2005
  2. Thomas Guettler

    xml.parsers.expat vs. xml.sax

    Thomas Guettler, Apr 27, 2004, in forum: Python
    Replies:
    2
    Views:
    882
    Martijn Faassen
    Apr 27, 2004
  3. Replies:
    2
    Views:
    364
  4. kaens
    Replies:
    6
    Views:
    326
    Stefan Behnel
    May 23, 2007
  5. kaens
    Replies:
    0
    Views:
    370
    kaens
    May 23, 2007
Loading...

Share This Page