Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Replace the Text of an XML Element Using LibXML and DOM

by jmurphy (Acolyte)
on Jul 02, 2002 at 18:40 UTC ( #178953=note: print w/replies, xml ) Need Help??


in reply to Re: Replace the Text of an XML Element Using LibXML and DOM
in thread Replace the Text of an XML Element Using LibXML and DOM

Thanks so much for the reply,

Hopefully this can help someone else. I ended up implementing as follows:

my $root = $dom->getDocumentElement; my $bodies = $root->getElementsByTagName( "MessageBody" ); foreach my $body ( $bodies->get_nodelist() ) { my $encoded_node = $body->firstChild(); $encoded_node->replaceDataString( $encoded_node->data(), decode_ba +se64( $encoded_node->data() )); }
Again thanks. You got me going on the right path.

Take care,
Jay

Replies are listed 'Best First'.
Re: Re: Re: Replace the Text of an XML Element Using LibXML and DOM
by lestrrat (Deacon) on Jul 02, 2002 at 20:28 UTC

    I learned something new, too :) ( didn't know about replaceDataString() )

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://178953]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2018-07-22 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (456 votes). Check out past polls.

    Notices?