473,809 Members | 2,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.dt d">
<xiam>
<deliverReque st id="10234690"> ''' Need to retrieve this number using
ASP
<to>test</to>
<from>number</from>
<content type="text">Tes t 2</content>
</deliverRequest>
</xiam>

Thanks.
Jul 19 '05 #1
2 1352
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.dt d">
<xiam>
<deliverReque st id="10234690"> ''' Need to retrieve this number using
ASP
<to>test</to>
<from>number</from>
<content type="text">Tes t 2</content>
</deliverRequest>
</xiam>

Thanks.

dim id
id=xmldoc.selec tSingleNode("/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.selectSi ngleNode("/xiam/deliverRequest/@id").nodeTyped Value

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

Chris.

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:%2******** **********@TK2M SFTNGP10.phx.gb l...
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.dt d">
<xiam>
<deliverReque st id="10234690"> ''' Need to retrieve this number using
ASP
<to>test</to>
<from>number</from>
<content type="text">Tes t 2</content>
</deliverRequest>
</xiam>

Thanks.

dim id
id=xmldoc.selec tSingleNode("/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
3680
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 would like to create a self extracting zip with default file path extraction and force over-write. The powerArchiever just don't let me call it unless I'm using the GUI. Any idea, experience and suggestion are welcome. Thank you. -Calvin
7
14819
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 representing the integer into another std::string? In the example above, I'd want to end up with a std:string whose value is "243". The substrings "default(" and ")" are invariant - they're always present in the string I have to work with. ...
1
2808
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 assigned the task of extracting content from a given HTML page. If anyone's familiar with the Yahoo! Store order confirmation screen, I need to be able to grab the total amount from the table to the right-hand side. (Sample File:
4
15860
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 write a VB script, to be executed either within Access or executed at the CMD prompt, which will loop through all the records and open the document object and save it to a Word document that I can access from Windows Explorer. An additional info...
3
1930
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 alphabetticaly in database. Any ideas how to right such a function thanks alfred
4
7920
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 draggin the title bar. However, I am having trouble extracting the POINT structure that is supposed to come with the message. For example: Structure POINTS Public x As Short
2
4016
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 extract some news items from a web site. To do this, I'm using Microsoft Word VBA and using the following bit of script:
3
1924
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 , full_domain=en.wikipedia.org ,significant_domain=wikipedia.org Using urlsplit (of urlparse module), I will be able to get the full_domain, but Im wondering how to get significant_domain. I will not be able to use like counting the number of dots. etc
6
4458
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 some one experience with other libaries to
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10637
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7660
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.