aspose file tools*
The moose likes XML and Related Technologies and the fly likes getNodeValue doesn't return the whole String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "getNodeValue doesn Watch "getNodeValue doesn New topic
Author

getNodeValue doesn't return the whole String

Vladan Radovanovic
Ranch Hand

Joined: Mar 20, 2000
Posts: 216
Yes, something strange is happening.
I am trying to read an xml document which contain few elements that contain base64Encoded Strings. These are very long strings and in this case some 40000+ characters. (They are actually documents that have been encoded and now are part of the xml document) However getNodeValue will return me only part of that particular String. Anyone has an idea what is happening here?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
Which parser toolkit are you using?
Also - is it possible that your are getting the complete String but the next step somehow cuts it or fails to handle it properly.
Bill
[ August 28, 2003: Message edited by: William Brogden ]
Vladan Radovanovic
Ranch Hand

Joined: Mar 20, 2000
Posts: 216
Hi William, I am using xerces toolkit that came with jwsdp 1.2.
And I have already checked what are you suspecting. However that's not the case. This is the way I am getting it:

Right after I will print the length and the actual contents of that string and for 4 different elements the original string is truncated somewhere between 800 and 1000 chars while that string is some 40000+ inside the xml file.
Also I have came across this. But his solution didn't work for me. Other than that very few resources on this one. Few other people in java.sun forums reported same thing but I haven't seen the solution yet. Thank you for the response anyway.
Vladan Radovanovic
Ranch Hand

Joined: Mar 20, 2000
Posts: 216
This is all happening on the client side with the Document that I get as a response message from the web service. If I save that document to a local file system, and then use DOMParser to parse it, getting node values from these elements works fine and returns the whole string. At least now I can proceed and continue what I need to do.
William, thanks again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getNodeValue doesn't return the whole String