CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Best XML Module for ...

 



johann_p
Novice

Feb 28, 2007, 3:17 AM

Post #1 of 2 (391 views)
Best XML Module for ... Can't Post

There seem to be a lot of modules on CPAN for handling XML and I am a bit confused what their respective advantages and limitations are.

Can you recommend which module would be most easy to use and still handle the following things:

* (most important) there should be an easy way to create or access content of tags that again can contain tags like e.g.
<mytag1 attr1="somevalue">this is the content of mytag1<mytag2 nr="1" /> but with <mytag2 attr="abc"> other tags included</mytag1>
It is absolutely essential to keep and manipulate the exact order of the embedded tags.

* should be able to handle encodings

* should be able to automatically escape characters apropriately, e.g. replace ">" by "&gt;" in the content of a tag.

* should be able to parse from a string and create into a string

Documents are not very large, so this can be based on a parser that parses everything into memory at once. Also speed is not all too important.


davorg
Thaumaturge / Moderator

Mar 1, 2007, 5:46 AM

Post #2 of 2 (387 views)
Re: [johann_p] Best XML Module for ... [In reply to] Can't Post

Sounds like you need XML::XPath (or XML::LibXML using the XPath methods).

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives