When I parse xml with an entity refererence in an attribute to a DOM tree, I am not able to serialize the xml back to the original content. The question of retaining this references has been asked before in this forum and I am aware that this is not supported by xerces. But it is possble to check by myself for the existence of such entities? In other words : When I use a contenthandler, how could I check for entities that are declared within attributes?

Example xml where the salary attribute has the entity &one which I want to detect in the parsing.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE personnel SYSTEM "personal.dtd" [
 <!ENTITY name "Big">
 <!ENTITY one "1">
]>
<person id="Big.Boss" salary="&one;">
   <name><family>Boss</family> <given>&name;</given></name>
    <email>[email protected]</email>
  </person>
</personnel>


Regards,
Dick Deneer

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to