in reply to CDATA probelm in XML::SMart
When there is a text which contains the & and ; together with out any space this & is not parsed as & instead it throws error.
It sounds like content expects XML, but what you are passing isn't valid XML. A simple way to convert plain text to XML is
for ($text) { s/&/&/g; s/'/'/g; s/"/"/g; s/</</g; s/>/>/g; }
However, I'd recommend avoiding content completely. The whole point of the module is to provide much better means of accessing and changing data than low-level functions like content.
Also there are some binary data in my text.
That may be a problem.
XML/1.0 doesn't allow many characters.
XML/1.1 doesn't allow the NUL character (chr(0)).
You might have to alter your scheme to allow the binary bits to be base64-encoded.
use XML::SMART;
That should be use XML::Smart;. Case *is* important, even if what you have *appears* to work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CDATA probelm in XML::SMart
by KarthikK (Sexton) on Nov 21, 2007 at 18:49 UTC | |
by ikegami (Patriarch) on Nov 21, 2007 at 18:55 UTC | |
by KarthikK (Sexton) on Nov 21, 2007 at 20:51 UTC | |
by ikegami (Patriarch) on Nov 21, 2007 at 20:56 UTC |