Re: [xml] Entity replacement not correct. !!

On Thu, Mar 08, 2007 at 12:29:57PM +0530, harbhanu wrote:

  We are using SAX parser for parsing .In our xml documents there are some
standard entities like < and & in the attribute for some elements

  We were expecting that they will get converted to the proper equivalent
after parsing,(&).but & is getting converted to &

  SAX sucks for entities handling in attributes. Libxml2 has a workaround
but it leads to this. Ask for entity replacement at the parser level. This
has been described in the past.

Similar defect was reported earlier, link for the same is


Also, we have done xmlSubstituteEntitiesDefault (1); after doing
xmlInitParser ();

  xmlSubstituteEntitiesDefault uses the global variable and has been
progressively abandonned, use a parser entry point where you supply the 


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]