Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: XML::Simple functionality with XML::Twig ?

by saberworks (Curate)
on Jun 15, 2006 at 15:42 UTC ( [id://555527]=note: print w/replies, xml ) Need Help??


in reply to XML::Simple functionality with XML::Twig ?

XML::Simple does namespaces quite nicely, just use the NSExpand => 1 option. Also, what makes you think it doesn't handle CDATA fields? I can't find anything in the docs about that.

Replies are listed 'Best First'.
Re^2: XML::Simple functionality with XML::Twig ?
by freakingwildchild (Scribe) on Jun 15, 2006 at 15:51 UTC
    I didn't find any reference to XMLOut which supports CDATA and namespace support in writing. Reading is all ok; but writing?

    Also I tried namespaces with 'author:itunes' as test but didn't really work quite well ; how are namespaces supported then in reading (and writing) through XML::Simple? $xml->{'author:itunes'} ? (I already tried and didn't work)

    Namespaces/CDATA writing support is the main reason I am going towards XML::Twig; but if that is not needed and I get intending only as "extra" for my application; I'd rather stay with XML::Simple and its memory requirements against to XML::Twig.

      I've personally only used the namespace support using XMLIn, but the docs specify that NSExpand works on XMLOut, as well. Did you properly set the xmlns attribute for the tag? That's the only way it will work, I guess.

      Re: CDATA, I'm not sure about writing, I actually moved to xml::libxml for writing because it was easier.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-03-28 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found