[jdom-interest] Getting Entity values from DOCTYPE node

Matthew Young young_matthewd at hotmail.com
Tue Sep 7 05:16:42 PDT 2004


Before building a document (JDOM beta10) I set the expand entities method to 
false (ie. "builder.setExpandEntities(false);" ) so the entities don't 
disappear upon parsing.  After building I want to be able to access the 
values of entities defined to the DOCTYPE node.  Haven't found a way on the 
net.  For example, if the XML document looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE entityload SYSTEM "entity_load.dtd" [

    <!ENTITY DM_DFG "tdi710">

and I want to pull the value of DM_DFG.  How is this done?  Can this be done 
in JDOM?  In the W3C DOM DocType object there is a getEntities method which 
looks like it might be able to access entities.  I tried outputting the JDOM 
document to a W3C document but the entities don't seem to follow.

/ Matthew Young

MSN Motor: Köp & sälj din bil här http://carview.msn.se/bilsok/

More information about the jdom-interest mailing list