[jdom-interest] Default attribute values

NARAYANA MURTHY, Sathyaprakasha (GEAE, GTS India) sathyaprakasha.narayanamurthy at ae.ge.com
Sun Dec 8 21:10:18 PST 2002

I have a DTD, part of which specifies an element as follows

<!ATTLIST elmt attr1 CDATA #FIXED "A">
<!ATTLIST elmt attr2 CDATA #FIXED "B">

I build the Document object by loading an XML file, built according to the
above DTD..

Later in my program, while parsing the elments , When  I encounter the elmt
Element objects , I can get the fixed default attributes for attr1 and attr2
by using getAttributeValue("attr1") etc.

But when I programatically add additional Elements of type 'elmt' and then
call the methods to get the default attriubte values for those newly added
elements I get the
return value as null.  

Any suggestions?


GE Global Technology Solutions

More information about the jdom-interest mailing list