Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 21st, 2009, 03:32 PM
Authorized User
 
Join Date: Jun 2003
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using ASP and XMLDOM -can't retrieve values

Hi - I have a complex XML file and am using XMLDOM to retrieve it's values.
I have all <CONTACT> elements being retrieved in a list. I want to loop thru that list and retrieve various sub-elements (such as name, phone, email). I can loop thru and get the element name, but for some reason I can't get the value. nodeValue doesn't retrieve anything and .Text seems to retrieve too much. It's a big long string (possibly holding the text from all descendants too?)

Can anyone help?
Thanks.
Melissa
 
Old January 21st, 2009, 04:12 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Well, there's a bug in your code. But without seeing your XML source or your code, there's not much hope of helping you find it.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old January 21st, 2009, 04:14 PM
Authorized User
 
Join Date: Jun 2003
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using ASP and XMLDOM -can't retrieve values

You are exactly correct!
I was just sending my code in an email to someone and noticed that my .text call was on the Node and not the element ... this is why I got the big list of values.

Thanks so much for responding!
Melissa





Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble retrieving element value ASP/XMLDOM mussitsch XSLT 1 January 21st, 2009 04:16 PM
How to retrieve values from gridview rojiin ASP.NET 2.0 Basics 1 June 26th, 2007 07:32 AM
How to retrieve checkbox values which are checked SMM Classic ASP Professional 2 June 3rd, 2007 06:45 PM
retrieve values of __VIEWSTATE marvz ASP.NET 1.0 and 1.1 Basics 2 July 13th, 2005 03:01 AM
How to retrieve multiple values at run time using anshul21 Crystal Reports 1 May 31st, 2004 10:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.