Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 12th, 2011, 03:26 AM
Registered User
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to query on xml data


I have try to retrieve data from a xml file. I write following code to query on xml. But don't get expected result. It return Zero nodeLenght.
Please help me.

Naznin Nahar.

MY code-

Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async = false
xmlDoc.Load Server.MapPath("\Data\XML Data\strFile.xml")

set xmlNode =xmlDoc.selectNodes("//rs:data/z:row[(@C_ID=8 and @S_TYPE='Skill')]")

XML file -

<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly' rs:CommandTimeout='30'>
<s:AttributeType name='S_C_ID' rs:number='1'>
<s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true' rs:maybenull='false'/>
<s:AttributeType name='C_ID' rs:number='2' rs:nullable='true' rs:writeunknown='true'>
<s:datatype dt:type='ui1' dt:maxLength='1' rs:precision='3' rs:fixedlength='true'/>
<s:AttributeType name='S_NAME' rs:number='3' rs:nullable='true' rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='50'/>
<s:AttributeType name='S_TYPE' rs:number='4' rs:nullable='true' rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='20'/>
<s:AttributeType name='SNO' rs:number='5' rs:nullable='true' rs:writeunknown='true'>
<s:datatype dt:type='ui1' dt:maxLength='1' rs:precision='3' rs:fixedlength='true'/>
<s:extends type='rs:rowbase'/>
<z:row S_C_ID='688' C_ID='8' S_NAME='VIZ Render' S_TYPE='Skill'/>
<z:row S_C_ID='689' C_ID='8' S_NAME='GIS' S_TYPE='Skill'/>
<z:row S_C_ID='690' C_ID='8' S_NAME='CADD' S_TYPE='Skill'/>
<z:row S_C_ID='764' C_ID='2' S_NAME='Capital Market/Investment Banking' S_TYPE='Skill'/>
<z:row S_C_ID='765' C_ID='2' S_NAME='Remittance' S_TYPE='Skill'/>
<z:row S_C_ID='766' C_ID='2' S_NAME='International Banking' S_TYPE='Skill'/>
<z:row S_C_ID='767' C_ID='2' S_NAME='Syndicated Loan Management' S_TYPE='Skill'/>
<z:row S_C_ID='768' C_ID='4' S_NAME='Accounting' S_TYPE='Skill'/>
<z:row S_C_ID='820' C_ID='4' S_NAME='Media &#x26; Communication' S_TYPE='Skill'/>
<z:row S_C_ID='821' C_ID='4' S_NAME='Advertising' S_TYPE='Skill'/>
<z:row S_C_ID='822' C_ID='4' S_NAME='Photography' S_TYPE='Skill'/>
<z:row S_C_ID='335' C_ID='2' S_NAME='General Banking' S_TYPE='Work Area' SNO='1'/>
<z:row S_C_ID='376' C_ID='4' S_NAME='Teaching/Training' S_TYPE='Work Area' SNO='1'/>
<z:row S_C_ID='377' C_ID='4' S_NAME='Education Administration/Management' S_TYPE='Work Area' SNO='2'/>
<z:row S_C_ID='336' C_ID='2' S_NAME='Retail Banking' S_TYPE='Work Area' SNO='2'/>
<z:row S_C_ID='337' C_ID='2' S_NAME='Corporate' S_TYPE='Work Area' SNO='3'/>
<z:row S_C_ID='378' C_ID='4' S_NAME='Education Counseling' S_TYPE='Work Area' SNO='3'/>
<z:row S_C_ID='428' C_ID='8' S_NAME='Software Architect' S_TYPE='Work Area' SNO='3'/>
<z:row S_C_ID='429' C_ID='8' S_NAME='Project Manager (Software)' S_TYPE='Work Area' SNO='4'/>
<z:row S_C_ID='1012' C_ID='2' S_NAME='Relationship' S_TYPE='Work Area' SNO='34'/>
Reply With Quote
  #2 (permalink)  
Old July 3rd, 2012, 01:41 AM
Registered User
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

SQL Server includes the ability to run queries that create XML data from your tables. XML provides standard formatting, so you can transfer data between heterogeneous platforms. The SQL "XML path" function sets up the root and the data inserts into XML nodes when the data displays. You can view the data in Management Studio or copy and paste the data to a text file to store the information in a separate location click here for more info
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple input xml / get data from other xml file elayaraja.s XSLT 3 July 25th, 2008 06:59 AM
VB.net, adding XML data to an existing XML file saikoboarder XML 11 April 17th, 2008 04:19 PM
pls give the query for XML data in Sqlserver2005 veeruu SQL Server 2005 0 July 27th, 2006 05:07 AM
pls give query to diplay XML data in Sqlserver2005 veeruu XML 0 July 27th, 2006 05:06 AM
How to Query XML Data from XSLT Form kwilliams XSLT 1 December 3rd, 2005 06:14 AM

All times are GMT -4. The time now is 04:27 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.