Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: new user of xml::twig

by Anonymous Monk
on Aug 03, 2012 at 00:00 UTC ( #985124=note: print w/replies, xml ) Need Help??

in reply to new user of xml::twig

You have lots of mistakes, what examples are you following?

$in_twig->parsefile('in.xml'); # ERROR, out of order $in_twig = XML::Twig->new( # ERROR, obliterating $in_twig twig_roots => { violation => 1 }, ## ERROR, 1 is not + a callback twig_handlers => { ## um, this goes in twig_roots violation => sub { processViolation( $in_twig, $_, +\%out_twigs, \%opt ); }

I suggest you add strict/warnings ( Read this if you want to cut your development time in half! ) and copy one of these examples ?node_id=3989;BIT=use%20XML%3A%3ATwig;BIS=-;a=%5BAnonymous%20Monk%5D;xr=1,,

Replies are listed 'Best First'.
Re^2: new user of xml::twig
by Anonymous Monk on Aug 03, 2012 at 05:42 UTC

    Thanks for your reply. I could not open the examples link. Also what I want to do is basically read an xml, build a twig, access a certain twigroot and then rearrange data in another xml file. If you show me a sample code, it'll be greatly appreciated.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985124]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2018-01-21 01:16 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.