Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

XML C++/DOM problems....

Thread Tools
 
Search this Thread
 
Old 29 April 2003, 02:10 AM
  #1  
BoxerFlat4
Scooby Regular
Thread Starter
 
BoxerFlat4's Avatar
 
Join Date: Nov 2001
Location: N Wales
Posts: 923
Received 0 Likes on 0 Posts
Question

Anybody online used the XML DOM model, preferably in C++ before ? Having trouble accessing information from a DOMElement, i.e.

<ScoobyNet>It's A Scorcher!</ScoobyNet>

I can get access to it's "Name" part of the DOMNode(ScoobyNet), but can't seem to get to the "It's A Scorcher" value anywhere : it's not in the Value part of the DOMNode.

Anybody ? I suspect it's probably staring at me in the face....

[Edited by BoxerFlat4 - 4/29/2003 2:11:02 AM]
Old 29 April 2003, 10:24 AM
  #2  
BoxerFlat4
Scooby Regular
Thread Starter
 
BoxerFlat4's Avatar
 
Join Date: Nov 2001
Location: N Wales
Posts: 923
Received 0 Likes on 0 Posts
Post

Bounce for the morning....
Old 29 April 2003, 11:45 AM
  #3  
TopBanana
Scooby Regular
 
TopBanana's Avatar
 
Join Date: Jan 2001
Posts: 9,781
Likes: 0
Received 0 Likes on 0 Posts
Post

InnerText

Edit - actually I think it might just have been 'Text' in the COM version

[Edited by jlanng - 4/29/2003 11:47:19 AM]
Old 29 April 2003, 11:48 AM
  #4  
Dizzy
Scooby Regular
 
Dizzy's Avatar
 
Join Date: May 2001
Posts: 2,537
Likes: 0
Received 0 Likes on 0 Posts
Cool

IIRC isn't there a "dump" feature that will tell you the attributes? alough I suspect Jlang has it
Old 29 April 2003, 01:19 PM
  #5  
BoxerFlat4
Scooby Regular
Thread Starter
 
BoxerFlat4's Avatar
 
Join Date: Nov 2001
Location: N Wales
Posts: 923
Received 0 Likes on 0 Posts
Post

Thanks guys...

Found the problem, was using a DOMTreeWalker to process the document, and it wasn't behaving as I expected. Turned out I was filtering out all nodes EXCEPT element nodes, which meant I never had access to the relevant text in the first place.

Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
warrenm2
Non Scooby Related
87
27 March 2005 04:07 PM
warrenm2
Non Scooby Related
14
11 February 2005 08:06 PM
David_Wallis
Computer & Technology Related
3
21 October 2004 11:27 AM



Quick Reply: XML C++/DOM problems....



All times are GMT +1. The time now is 08:02 AM.