Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: XML -- Kudos to XML::Twig

by rkg (Hermit)
on Oct 01, 2003 at 15:34 UTC ( [id://295654]=note: print w/replies, xml ) Need Help??


in reply to Re: XML::Parser Style=>Subs and undefined subroutines
in thread XML::Parser Style=>Subs and undefined subroutines

Wow.

I am blown away by the power and ease-of-learning of XML::Twig.

I jumped in without studying the docs carefully... and it seemed whenever I needed something ("Wouldn't it be great to call 'parent' here to get the parent?", and "Wouldn't it be great if 'att' generalized to 'atts', to give me all of them?" and "Wouldn't it be nice if 'first_child' generalized to 'children', to get all the kids?") and lo and behold they were all right there, with the API I'd expect.

High praise for XML::Twig, and thanks, Mirod.

(Likely this is a RTFM question, but how hard is it to get Twig to validate as well as parse...?)

rkg

Replies are listed 'Best First'.
Re: Re: XML -- Kudos to XML::Twig
by mirod (Canon) on Oct 01, 2003 at 16:32 UTC

    First, thanks for the comments :--) You can also have a look at the tutorial, which seems to be the easiest way to grok the module for most people, as the POD is really more of a reference, at 2500 lines.

    how hard is it to get Twig to validate as well as parse?

    Rather hard actually. I could add (yet another!) option to use XML::Checker instead of XML::Parser, but I am not sure I trust it completely. So the easiest way is probably to install libxml2 and to use xmllint --valid on the output file.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://295654]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-20 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found