Hi

I have a problem getting attribute value. I have a dtd 

<!ELEMENT body (bodypart*)>
<!ELEMENT bodypart EMPTY>
<!ATTLIST bodypart 
    xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink";
        xlink:href CDATA #REQUIRED
        xlink:type CDATA #IMPLIED
>

i have a xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE body SYSTEM "http://com/dtd/xml/v1/body.dtd";>
        <body>
        
          <bodypart xlink:type="TEXT/PLAIN" 
xlink:href="http://com/wm/xml/rfc822.txt";>        
          </bodypart>
        
          <bodypart xlink:type="APPLICATION/OCTET-STREAM" 
xlink:href="http://com/wm/mail/genimage/zz.c";>
            zz.c
          </bodypart>
        
          <bodypart xlink:type="APPLICATION/MSWORD" 
xlink:href="http://com/wm/mail/genimage/Readme.doc";>
            Readme.doc
          </bodypart>

</body>

what i want is value of xlink:href 
like "http://com/wm/mail/genimage/Readme.doc";


my program



private void traverse (Node node) {
try {   
int type = node.getNodeType();  
if (type == Node.ELEMENT_NODE) {
Node child = e.getFirstChild();
if (child.getNodeType() == Node.TEXT_NODE) {
value = child.getNodeValue().toString();
}
 }
NodeList children = node.getChildNodes();
if (children != null) {  
for ( int i = 0; i < children.getLength(); i++)
traverse(children.item(i));
 }
}
catch(Exception e) {
}


can anyone help me

thanks
vijay

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

Reply via email to