This week's book giveaway is in the
General Computing
forum.
We're giving away four copies of
Arduino in Action
and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Engineering
»
XML and Related Technologies
Author
wat does getNodeValue() in DOM parser returns??
Arjun Karthick
Ranch Hand
Joined: Jan 04, 2007
Posts: 77
posted
Apr 11, 2008 04:06:00
0
Hi
When i use the getNodeValue method to get the value of the Node i get only part of the value. Need to know if the special charactor
The code to get the value.
String xpathValue = transformChild.getFirstChild().getNodeValue();
The XML Node is :
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><ds:XPath>//*[@id='secinfo']/child::*/text()</ds:XPath></ds:Transform>
The expected value : //*[@id='secinfo']/child::*/text()
The value i get is : //*[@ID='secinfo']
Can someone kindly let me know, the reason for this
Thanks
Arjun
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
2
I like...
posted
Apr 11, 2008 09:09:00
0
Is the next sibling of that node another text node with the rest of the text?
Arjun Karthick
Ranch Hand
Joined: Jan 04, 2007
Posts: 77
posted
Apr 11, 2008 09:14:00
0
No it was my mistake.
The code was wrong.
Apologize for posting without enough analyze.
have to improve my debug skill.
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: wat does getNodeValue() in DOM parser returns??
Similar Threads
Writing XML element
Node Value Question
Doubt in behaviour in methods of NodeList interface.
getNodeValue() returns null
Why I can't retrieve records stored in a XMLFile correctly?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter