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
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Reply 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
How to implement getElementById() with Xerces using XML Schema?
Regarding xml parsing using dom
Empty tags in Java DOM API
some notes on xml
problem in creating tag library