problem with getNodeValue

B

Bernard Kufluk

I'm using the IBM4C distribution (Xerces really) and I'm having trouble
reading a node value.
I'm reading a large file and most of it works successfully; until I hit a
section of XML that looks like this:-

<key mine="1">
<blah>hello</blah>
<map>A</map>
</key>

<key mine="2">
<blah>goodbye</blah>
<map></map>
</key>

I can process the first key no problem - when I process the second key - and
try to get child node on the map - to my surprise it succeds - I would have
thought that there would be no child of the map element.
But if there is a child then ok - BUT when I read the text node child of the
map element - it's value turns out to be "#" !

What's going on - has anyone else seen this ?

Thanks

Bernard
(e-mail address removed)
 
B

Bernard Kufluk

Apologies - I've found my mistake - the code is being clever and picking up
the default value from the schema as the
node value is not set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top