473,379 Members | 1,520 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,379 software developers and data experts.

XPATH in SQLServer 2000

Hi, i am trying to parse an XML using OPENXML in a SQL server procedure.
The Xml was created by the DataSet.WriteXml command in .Net.

Here is the XML and the Stored procedure

<?xml version="1.0" standalone="yes"?>
<BidData xmlns="http://tempuri.org/BidData.xsd">
<Bid>
<UserID>1</UserID>
<TagNumber>1234</TagNumber>
<ImpersonatingUserID>1</ImpersonatingUserID>
<Description>Test-Sumit</Description>
<Status>1</Status>
<TrancheServiceTermId>2</TrancheServiceTermId>
</Bid>
<BidFormFieldData>
<BidFormFieldID>1</BidFormFieldID>
<BidFormFieldValue>1234</BidFormFieldValue>
</BidFormFieldData>
<BidFormFieldData>
<BidFormFieldID>2</BidFormFieldID>
<BidFormFieldValue>4567</BidFormFieldValue>
</BidFormFieldData>
</BidData>

----------------------------------------------------------------------------
---------

CREATE PROCEDURE dbo.sp_XmlTest
(@InputXml Text,
@BidId INTEGER OUTPUT)
AS
DECLARE @hDoc int

exec sp_xml_preparedocument @hDoc OUTPUT,@InputXml

SELECT @BidId=UserID
FROM OPENXML (@hDoc,'/BidData/Bid',2)
WITH (UserID numeric(18,0))
EXEC sp_xml_removedocument @hDoc
GO
----------------------------------------------------------------------------
------------------------------------

the problem i am having is that the XPATH does not find the UserID element
if my XML has the namespace attribute but works fine without it
(xmlns="http://tempuri.org/BidData.xsd"). Can you let me know what am i
missing here ?
Jul 20 '05 #1
0 1514

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

Similar topics

5
by: Steve | last post by:
Hi; I went to the microsoft site to try to find a guide to the error messages that the jdbc drivers give ( for sqlserver 2000 ). I had no luck. Does anyone know if there is such a guide? ...
2
by: Patrox | last post by:
Hi ! when installing sqlserver 2000 on a Windows 2003 server it explicitly tells "server not compatible with Windows 2003" during install, but it can carry on. After we applied serfice pack 3a...
0
by: K.Strunk | last post by:
Hi! I have a problem signing a XML-document. I need to sign a subnode of a document. So I need to refer to this subnode from within my signature. But how can I do that with XPath? I tried the...
1
by: DV | last post by:
Hello, can anyone tell me or point me to somewhere what the exact differences (in terms of when would I use what) between XPath, XLink, XPointer and DOM are? Does it require special software...
0
by: williams | last post by:
I am trying to encrypt data in a SQLServer 2000 Cluster using Microsoft EFS. I have successfully encrypted a standalone DB but we are having difficulty with the Cluster. I am only encrypting the...
4
by: Gismo | last post by:
I have got file raport.rld which is an XML file generated by MS Reporting Services. The problem is: in this file are tags from two different namespaces ...
14
by: Roy Gourgi | last post by:
Hi, I need to store and retrieve information from a database. It looks as though there is a lot more support for SQLServer than there is for Access, correct me if I am wrong. What do I have...
3
by: Dan Sikorsky | last post by:
Can I use SQLServer 2000 with ASP.NET 2.0 instead of SQLServer 2005, and use the .Net 2.0 Membership functionality? I've setup my Login page, controls, etc., and now it's time to use the Web...
2
by: =?Utf-8?B?SmVmZnJleQ==?= | last post by:
I have some old ASP programs w/ SQLserver 2000 databases. Now I am developing ASP.NET projects using VB 2005 and SQLserver 2005. What are the best procedures to develop and test the ASP.NET...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.