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

Strip XML document

by corfuitl (Sexton)
on Jul 10, 2018 at 15:39 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-23 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found