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

XML::LibXML

by ForgotPasswordAgain (Deacon)
on Jul 11, 2008 at 14:13 UTC ( #696968=note: print w/ replies, xml ) Need Help??


in reply to Seralize a XML tree from XML::Parser

XML::LibXML can serialize XML:

    use XML::LibXML;
    my $parser = XML::LibXML->new();

    my $doc = eval { $parser->parse_file($file) };
    if ($@) {
        print STDERR "Couldn't parse '$file', skipping\n";
    } else {
        my $dom = $doc->documentElement;

        # use DOM methods here

        $doc->toFile($file);
    }


Comment on XML::LibXML

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2015-07-29 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls