aspose file tools*
The moose likes Product and Other Certifications and the fly likes Empty Tags in Java DOM API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Empty Tags in Java DOM API" Watch "Empty Tags in Java DOM API" New topic
Author

Empty Tags in Java DOM API

amit sanghai
Ranch Hand

Joined: Dec 05, 2000
Posts: 231
Hi,
Is there any method in Java DOM API to handle empty tags? E.g. consider the following XML file.
<?xml version="1.0"?>
<MESSAGE>
<RATES>
</RATES>
</MESSAGE>
here the output, using Java and DOM, is
parent tag is MESSAGE
root is MESSAGE
root is RATES
Value in root is null
Now, consider the following XML file:
<?xml version="1.0"?>
<MESSAGE>
<RATES></RATES>
</MESSAGE>
here the output, using Java and DOM, is
parent tag is MESSAGE
root is MESSAGE
root is RATES.
So, how do we know that there is an empty tag in the XML file?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Empty Tags in Java DOM API
 
Similar Threads
Empty tags in Java DOM API
Regarding xml parsing using dom
problem in creating tag library
How to implement getElementById() with Xerces using XML Schema?
some notes on xml