473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Extracting XML with ASP can't find answer.

I have an XML file that contains nodes and I'm having no problem
extracting the information using ASP. However I can't seem to get the
ID number from the deliverrequest node from the example below.
Driving me crazy.. any help would be appreciated. Thanks

<!DOCTYPE xiamSMS SYSTEM "Message.dtd">
<xiam>
<deliverRequest id="10234690"> ''' Need to retrieve this number using
ASP
<to>test</to>
<from>number</from>
<content type="text">Test 2</content>
</deliverRequest>
</xiam>

Thanks.
Jul 19 '05 #1
2 1328
Shawn wrote:
I have an XML file that contains nodes and I'm having no problem
extracting the information using ASP. However I can't seem to get the
ID number from the deliverrequest node from the example below.
Driving me crazy.. any help would be appreciated. Thanks

<!DOCTYPE xiamSMS SYSTEM "Message.dtd">
<xiam>
<deliverRequest id="10234690"> ''' Need to retrieve this number using
ASP
<to>test</to>
<from>number</from>
<content type="text">Test 2</content>
</deliverRequest>
</xiam>

Thanks.

dim id
id=xmldoc.selectSingleNode("/xiam/deliverRequest").getAttribute("id")

HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #2
another method ...

Dim id
id = xmldoc.selectSingleNode("/xiam/deliverRequest/@id").nodeTypedValue

Jut a personal preference to have the attribute as part of the Xpath (I think this works without
setting the SelectionLanguage property for the xmldoc?).

Chris.

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Shawn wrote:
I have an XML file that contains nodes and I'm having no problem
extracting the information using ASP. However I can't seem to get the
ID number from the deliverrequest node from the example below.
Driving me crazy.. any help would be appreciated. Thanks

<!DOCTYPE xiamSMS SYSTEM "Message.dtd">
<xiam>
<deliverRequest id="10234690"> ''' Need to retrieve this number using
ASP
<to>test</to>
<from>number</from>
<content type="text">Test 2</content>
</deliverRequest>
</xiam>

Thanks.

dim id
id=xmldoc.selectSingleNode("/xiam/deliverRequest").getAttribute("id")

HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.777 / Virus Database: 524 - Release Date: 14/10/2004
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Calvin FONG | last post by:
Dear all, Are there any utility that can be call by python to create self extracting zip file. I'm now using the powerarchiever. But the command line options aren't flexible enough. Basically, I...
7
by: cpp_weenie | last post by:
Given a std::string of the form "default(N)" where N is an integer number of any length (e.g. the literal string might be "default(243)"), what is the quickest way to extract the characters...
1
by: Cognizance | last post by:
Hi gang, I'm an ASP developer by trade, but I've had to create client side scripts with JavaScript many times in the past. Simple things, like validating form elements and such. Now I've been...
4
by: Otis Hunter | last post by:
I have been given an Access Database which contains a table that has an OLE object field that contains a Word document. That table contains hundreds of records. I would like to find out how I can...
3
by: Alfred | last post by:
Hi I would like to extract only 15 records at a time from the backend in alfabetic order. Click on a button and then the next 15. Reason data must come over a 56k modem. The data is not...
4
by: crafuse | last post by:
Hello, I've overridden the WndProc function in my form to hand some special behavior. Specifically, I look for the WM_NCMOUSEMOVE event to tell me when the user is trying to move the window by...
2
by: chris_j_adams | last post by:
Hi, I'm slowly discovering the world of JavaScript, so I'm not sure I'm attacking this problem in the right manner, thus if I'm in the wrong newsgroup, my apologies. What I'm trying to do is...
3
by: lazy | last post by:
Hi, Im trying to extract the domain name from an url. lets say I call it full_domain and significant_domain(which is the homepage domain) Eg: url=http://en.wikipedia.org/wiki/IPod ,...
6
by: Werner | last post by:
Hi, I try to read (and extract) some "self extracting" zipefiles on a Windows system. The standard module zipefile seems not to be able to handle this. False Is there a wrapper or has...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.