Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > problem with getNodeValue

Reply
Thread Tools

problem with getNodeValue

 
 
Bernard Kufluk
Guest
Posts: n/a
 
      04-21-2004
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
http://www.velocityreviews.com/forums/(E-Mail Removed)



 
Reply With Quote
 
 
 
 
Bernard Kufluk
Guest
Posts: n/a
 
      04-21-2004
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.


"Bernard Kufluk" <(E-Mail Removed)> wrote in message
news:c667at$3q38$(E-Mail Removed)...
> 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 Removed)
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xerces perl getNodeValue problem Waseem XML 0 07-06-2004 03:25 PM
getNodeValue Problem -Xerces Perl Waseem Perl Misc 0 07-06-2004 03:25 PM
Xerces C++ help in GetNodeValue(). Beginner question.... David XML 4 12-17-2003 11:08 PM
DOM Problem with getNodeValue() Peter Chatterton Java 9 10-20-2003 04:24 AM
SimpleDateFormat with Node.getNodeValue Manuel Java 0 08-27-2003 11:17 PM



Advertisments