Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: creating an XML string

by Joost (Canon)
on Dec 28, 2004 at 18:10 UTC ( [id://417807]=note: print w/replies, xml ) Need Help??


in reply to Re: creating an XML string
in thread creating an XML string

Nasty :-)

It won't work if the argument to encode() is in LATIN-1, and your XML file is UTF-8.

update:... hmmmmmm it appears that the "most reasonable" approach would be simply

sub encode { my $arg = shift; $arg =~ s/&/&amp;/g $arg =~ s/</&lt;/g; $arg; }
and do the character encoding seperately using Encode, or let the filehandle figure it out.

Replies are listed 'Best First'.
Re^3: creating an XML string
by PreferredUserName (Pilgrim) on Dec 30, 2004 at 19:14 UTC
    Well, they don't call it "quick and dirty" because it's elegant and complete.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-19 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found