XML::Parser & "invalid character"
by Jenda Krynicky other posts by this author
Mar 29 2002 6:41PM messages near this date
view in the new Beta List Site
Re: XML::Parser & "invalid character"
|
Re: XML::Parser & "invalid character"
I'm using XML files to replicate some settings and other stuff
between several servers (thanks for your previous help!). Everything
is cool except one thing.
I use character with code 2 as a separator or marker on several
places in the database. Things like
IF substring(PostingParameters.UserName,1,1) = char(2)
-- then it's an ID of a field and I will use value of that field
-- to log in
ELSE
-- its a constant
or
(from ASP) ... conn.SetPostingParameters(..., _
CSVSeparator & chr(2) & CSVQuote _
& chr(2) & CSVEscape, ...
the problem is that if I write a string containing a chr(2) into an XML
file, XMP::Parser (used via XML::Simple) will refuse to parse the file
with
not well-formed at line ...
error message. So I've replaced the char(2)s with  in the
generated XML. Still no success, it gives
reference to invalid character number at line ...
error message.
Is there any way to "properly" escape such a character so that it
would be accepted by XML::Parser?
And if not what character would you recomend to be used
(escaped if necessary) to make XML::Parser happy, but still being
reasonably safe that it will not be mistaken for "normal" data.
Thanks a lot, Jenda
=========== Jenda@[...].cz == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Jenda Krynicky
Chris Strom
|