Gunnar Hjalmarsson wrote:
Alois Heuboeck wrote:
I'm trying to feed text into an existing XML tree - the problem I'm
encountering is that the text may contain entity references (including
the 'forbidden' '&'), in which case the & is escaped by '&'. I'm
using the module XML::DOM for this.
<snip>
my $titleText = "Die Brücke.";
<snip>
$title->addText($titleText);
print "$titleText\n"; # for testing: Die Brücke.
print $title->toString(); # for testing: <title>Die
Br&uuml;cke.</title>
What if you simply say:
my $titleText = 'Die Brücke.';
you mean resolving the entities first?
It's a possibility, but at the moment I'd like to see the form of the
input as a given. (The script I posted to the list is a simplified test
version - in the 'real' script, the text comes from an external file.)
Is there no 'standard' way around this problem?
Alois
I can't help thinking of my latest message to this list:
http://www.mail-archive.com/beginners%40perl.org/msg91979.html
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/