Perl XML Parser DOM Tag Handler sample code ....

Discussion in 'Perl Misc' started by Sherbo, Oct 19, 2004.

  1. Sherbo

    Sherbo Guest

    Hello All,

    I'm trying to use the latest Xerces XML Perl module for XML file
    parsing, but the documentation is rather limited. Does anyone
    recommend a Perl XML parser with well-documented DOM tag handlers?

    I want to create a handler for three different XML tags: <a>, <b>, and
    <c>. Can someone please provide me some sample code to demonstrate how
    to :

    1.) Write a Perl DOM XML tag handler (in Xerces or other
    well-supported Perl XML mod)?
    2.) Use multiple tag handlers while reading in an XML file?

    Any information would be helpful.

    cheers,
    Sherban
     
    Sherbo, Oct 19, 2004
    #1
    1. Advertising

  2. Sherbo

    Ben Morrow Guest

    Quoth (Sherbo):
    >
    > I'm trying to use the latest Xerces XML Perl module for XML file
    > parsing, but the documentation is rather limited. Does anyone
    > recommend a Perl XML parser with well-documented DOM tag handlers?


    A well-documented XML DOM parser I have had success with in the past is
    XML::LibXML.

    > I want to create a handler for three different XML tags: <a>, <b>, and
    > <c>. Can someone please provide me some sample code to demonstrate how
    > to :


    What do you mean by a 'handler'? Do you want the parser to call back
    each time it hits a tag? If so, then you want a SAX parser rather than a
    DOM one.

    > 1.) Write a Perl DOM XML tag handler (in Xerces or other
    > well-supported Perl XML mod)?
    > 2.) Use multiple tag handlers while reading in an XML file?


    No. Try something for yourself, show us what you've tried, and we'll
    help you fix it.

    Ben

    --
    Although few may originate a policy, we are all able to judge it.
    - Pericles of Athens, c.430 B.C.
     
    Ben Morrow, Oct 21, 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. jstack
    Replies:
    1
    Views:
    645
    Tor Iver Wilhelmsen
    Jul 4, 2003
  2. Tobi Krausl
    Replies:
    0
    Views:
    377
    Tobi Krausl
    Nov 18, 2003
  3. shruds
    Replies:
    1
    Views:
    933
    John C. Bollinger
    Jan 27, 2006
  4. sugapablo
    Replies:
    0
    Views:
    2,210
    sugapablo
    Sep 21, 2007
  5. arne
    Replies:
    0
    Views:
    377
Loading...

Share This Page