Re: How to get Node value In a DOM Tree
I had found where exactly the problem is .The element Node will take only null values.
I have to create a DOM Tree in the following format.
<application_id> 1 </application_id>
< description> This is test </description>
The values that I am placing in the following tags tage<application_id>,<application_name> and <description> are from database.
My Code is
Element root = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
root = document.createElement(Root_Element);
Element applicationElement =document.createElement(Application);
Element applicationIdElement =document.createElement(application_id);
Now let us suppose that I had created Text Node
TextNode t = applicationElement.createTextNode(application_id);
Now The value which I am getting from database I am not sure that it is always be a String , Some times , it may be
In this situation How can I create DOM Tree??
To obtain the above xml structure, Whether I have to create text Node's under application?? Plz guide me.
Chris Burdess <dog@b...> wrote:
Seetha Rama Krishna wrote:
Yahoo! India Answers: Share what you know. Learn something new http://us.rd.yahoo.com/mail/in/mailanswersshare/*http://in.answers.yahoo.com/
Send free SMS to your Friends on Mobile from your Yahoo! Messenger http://us.rd.yahoo.com/mail/in/freesms/*http://messenger.yahoo.com/download.php
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format