Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Strip XML document

by corfuitl (Sexton)
on Jul 10, 2018 at 15:39 UTC ( #1218247=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    <?xml version="1.0" encoding="UTF-8"?>
    <tmx version="1.4"><header creationtool="xx" creationtoolversion="1" s
    +egtype="sentence" o-tmf="undefined" adminlang="en" srclang="en" datat
    +ype="undefined"></header><body>
    ...
    
    </body>
    </tmx>
    
  2. or download this
    use XML::LibXML;
    
    ...
        ( my $contents = join '', $child->childNodes ) =~ s,\n, <lb/> ,g;
        print $contents, $child->nodeName eq 'source' ? "\t" : "\n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-04-13 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?