How to select Xml as Xml?

If I select Xml nodes like this from sql server;

select xmlData.query('//Field[@F = "True"]') as extendedInfo from....

..how to loop through the items in C#?

I can't cast it to a System.Xml.XmlNodeList..?

0
mm8
2/27/2009 2:37:27 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

2 Replies
1518 Views

Similar Articles

[PageSpeed] 23

You can use the XmlDocument class.  There's a Load method and a LoadXml method.  One of these should get you what you want, after which you can select nodes as you need.


C# <---> VB.Net Translator
0
MetalAsp
2/27/2009 3:46:44 PM

mm8:

If I select Xml nodes like this from sql server;

select xmlData.query('//Field[@F = "True"]') as extendedInfo from....

..how to loop through the items in C#?

I can't cast it to a System.Xml.XmlNodeList..?

Read it in datatable or dataset and ten u can easily

refer here

http://mudassarkhan.wordpress.com/2009/01/10/accessing-xml-files-using-adonet/


MAKMark as Answer if this reply helps you
MVP ASP/ASP.Net
MVP ASP/ASP.Net
ASP.Net Hosting : Host DepotMy Site : ASPSnippets
0
mudassarkhan
2/27/2009 3:57:18 PM
Reply:

Similar Artilces:

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

How to create dynamic web form using XML Schema & XML and so on
Dear there; I have to build dynamic web form where i can design the form as i want, if you have an ideas about this field tell me as soon as possible, because i feel very frustration about that, The Microsoft Office InfoPath 2003 is available in this section. Hello Dear, I am also working on the same from a quite long time ? but did't get enough success. But i have created the form at run time as i want by storing from element in XMl file. and u can validate it by using XSLT or at code behind file as u want....

XML Web service , Web form
hi i hope if u could help me in what i am making so i have a web form that does the collection of the information from the user when he hits the button this data must be sent to the xml web service but this service must deliver this data in xml then i read the information and insert it to the sql serevr Database could you help me becouse iam soo confused about where to start and what is the stuff to search in it iam new in the xml stuff help me pleaseeeeee“To be incredible you must produce great work”Visit My Bloghttp://www.dotnetjunkies.com/WebLog/hussein My first question is why are yo...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

creating XML or XML Web Services?
Hi, I know XML is basically creating a file that allowed multiple applications to get data from the XML file ... and I am wondering .. why there is XML Web Services? What are the differences between these two? I am trying to create a Session that will keep update the value whenever it navigate to any page ... and get the Session value in multiple applications. In my guess, stores Session[] in XML file should work for what I am trying to do ... but what exactly is this XML Web Services? In what kind of situation we use XML or vice versa? All developers, even novices and hobbyists, must be a...

XML vs XML Web Services
I'm getting up to speed with XML and have the following questions: 1) Knowing XML means knowing how to design and create XML Web Services? 2) I found the amount of details on XML/XML Web services overwhelming, harder to digest than HTML or a new language. What's the best approach to learn and use it? Thanks.Please mark the post(s) that have helped you as "Answer" 1. No. They are different things 2. I'd start with a basic XML foundation (basic XML, XPath, and XSD), then review the basic WS things: soap, WSDL, and then from there on move to the WS-specs.Tomas Restrepo ...

XML on a Web Form
I want to use XML as the data source of my web form. I want the form fields populated with records from the file as I move from record to record via back and forward buttons on the webform. Anyone know how to do this? Any code appreciated Thanks Please find the example in below zip file. In that I tried to show it in 3 ways using SQLXML and .Net. http://www.w3coder.com/Downloads/SQLXMLNet.Zip Also there is a ruf draft related to the Zip file as article at http://www.w3coder.com/ado/sqlxmlnet.aspx In that article I did not explained much, but you can use it for reference for ...

Select XML Data type (xml) from sql server 2005 and then save to a XML file on local machine?? Help !
Hi All  I have a problem i am selecting a row of data from a database, within that row is a column in which i build up a xml in a stored procedure, it creates an xml and stores it in the column name xmldata which is of xml datatype. This works great My problem is how do i now create a xml file on my local machine with that data, below is what i have so far :- Dim conn1 As New SqlConnection()conn1.ConnectionString = (ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString) conn1.Open()Dim DBCmd As New SqlCommand Dim DataRecieved As SqlDataReaderDBCmd...

XML::Parser XML::DOM XML::XSLT
------_=_NextPart_001_01C6E0D0.3E27D77A Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi Craig and fellow VMS Perlers, You last wrote about this Fri 3/16/2001 11:24 AM, not counting your very helpful comments on Eisner/Decuserve more recently. One of my colleagues sent me an email requesting that I make XML::XSLT=20 available on VMS. perl 5.8.6, VMS 7.3-2, DECC 7.1 latest ACRTL (version 3) on Alpha XML::XSLT (version 0.48) depends on XML::Parser (version 2.34). This depends on expat (version 2.0.0). I built expat a...

XSLT to transform XML into XML in VB.NET
Hello. I need some help with XSLT. We have an XML coming in and I need to transform this XML to a format that we use using XSLT so that future changes in the incoming file are easy to change in the XSLT rather than changing the VB code.This is the sample input file  <MemberReports xsi:schemaLocation="http://developreports/myreport/v1/report.xsd"> <DateCreated>2006-04-15</DateCreated> <MemberReport> <MemberOrganization>MemberOrganization</ReportingOrganization> <Member> <Name> ...

xml stream from client to xml web service
I'm trying to send a serialized object based of an xsd to an xml web service by an xml stream. I've serialized it into a MemoryStream and trying to sent it to the service that I've made. The service should except this xml stream and create a serialized class of his own.   Giving the fact that I need to pass the Object as an xml stream, is it a good choisse to take a MemoryStream class for me? Trying to pass the MemoryStream instance made at the client side I get a compilation error as the instance made at the client side is recognized as a System.Io.MemoryStream while the argum...

sort xml in xml
Hi, How I can sort xml file in xml with VB.NetThanks,<?xml version="1.0" encoding="ISO-8859-1" ?>  <Liste>   <Form Famille="Administration" idXhtml="" idOffice="31574" nom="ADM" desc="" />   <Form Famille="Admini" idXhtml="" idOffice="31708" nom="ADM- 54 (2000)" desc="" />   <Form Famille="communication" idXhtml="" idOffice="31709" nom="ADM- 133 (2000)" desc="" />   <Form Famille="Admini" idXhtml="" idOffice="31710" nom="ADM- 9 (2000)" desc="" />   <Form Famille="Admini" idXhtml="" idOffice="31711" no...

XML Document from web form
Hi All, Does anyone have any ideas on how I can create a XML document from a web form and then email the XML document? Thanks you  can use xml class and create its object  or simply write a xml file  remember  a xml file   must have a  root element  but the first thing is what information u want to send in  that xml  u can write  a xml directly  from a data set using  write xml   and if u have to send that xml u can sensd it as attachment along with your  smtp mail   hi DarylHopkins ,Since XML basically used for...

Web resources about - How to select Xml as Xml? - asp.net.web-forms

Scottish Affairs Select Committee - Wikipedia, the free encyclopedia
The Scottish Affairs Select Committee is a select committee of the House of Commons in the Parliament of the United Kingdom . The remit of the ...

kotaku selects
Kotaku Selects

Facebook Testing Featured Videos in Videos Sections of Select Pages
Facebook confirmed to TechCrunch that it is testing a new design for the videos section of select pages – including ABC News and The New York ...

Select Apple Stores offering $50 discount on iPhone + Apple Watch purchases, but may not be best deal ...
... Watch Sports when bought with new iPhones, MacRumors notes. Not only is the promo not available online but it’s also being offered in select ...

Seventh Generation Selects 72andSunny After Review
Seventh Generation has named 72andSunny, New York, to lead strategy and brand development for its home and personal care products following a ...

T-Mobile Offers $100 Discount On Select Smartphones
There’s no denying the fact that a number of people are waiting for the two biggest sales on the planet—Black Friday and Cyber Monday. As a matter ...

BMW selects two artists to create M6 GT3 art cars
Filed under: Design/Style , Motorsports , BMW , Coupe , Performance , Racing Artists Cao Fei and John Baldessari will create the 18th and 19th ...

Benghazi Select Committee Hearings, Sponsored by the Stop Hillary PAC
Hearing is underway. Anyone watching? (YouTube livestream here .) I have it on as background noise and am paying intermittent attention as the ...

Best Buy to hold pre-Black Friday sale this Saturday at select locations
... from Apple, Microsoft, Sony, Fitbit and many others. Best Buy will hold a special pre-Black Friday sale for one day only this weekend. Select ...

Boehner's Last Stand: New Select Committee To Investigate Planned Parenthood
The other select committee has worked out so well for them, and their interrogation of Cecile Richards went swimmingly, too. It stands to reason ...

Resources last updated: 11/23/2015 11:05:00 AM