Re: [xml] Problem while inserting & as an attribute Value.

On Wed, Sep 26, 2007 at 02:28:15PM +0500, Ahmad Jalil Qarshi wrote:

   I  have  to generate an xml file and send it to some other third party
   application for processing. My XML file looks like
   <?xml version="1.0"?>
   <!DOCTYPE RequestMessage SYSTEM "RequestMessage.dtd ">
   Now  when  I  try  to  insert  a  new  Node <Password> along with some
   specific  value  containing  &  (ampersand) sign it generates an error
   error : unterminated entity reference          .?P
   I  know that for displaying & sign we can use &amp; but I can't use it
   here,  because  the  other third party application will consider it as
   part of the password.

  Your 'other third party application' is hence not XML conformant. There
is no solution in libxml2 or in the XML space for this. Either get this
fixed or don't use XML.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]