Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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, http://xmltwig.org/tutorial/, http://xmltwig.org/article


Comment on Re: new user of xml::twig
Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-12-29 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls