Hi,

I'm trying to use an Entity Refrence in my XML, but during parsing
Xerces2.0 does not returns the entity value. It returns the "null"
value. I'm using the Entity in one of my xml's attribute.

Following are the XML and DTD:

DTD**********************************************
<?xml encoding="UTF-8"?>
<!ENTITY img-path 'http://localhost:7001/cm/images/'>
**********************************************

XML**********************************************
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cmlib SYSTEM "file:///c:/xmltest/cmlib.dtd">
<document>
 <img src="&img-path;doc.gif"/>
</document>
**********************************************

Here when I write code something like this:
System.out.println(nd.getAttributes().getNamedItem("src").getNodeValue());

the output comes out is:
nulldoc.gif

I'm properly setting system id.

Is there anyone who have any idea about this, please tell me where I'm
doing wrong. It will be great!!

thanks,
Sanjay Mishra


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to