Select one row from a xml file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Chris Darnell (csdarnellRE-MOVE_at_darnellc.com)
Date: 05/26/04


To: microsoft.public.dotnet.framework.adonet
Date: Tue, 25 May 2004 23:22:05 -0500


 You can use the System.XML.XmlDocument object to load in the xml file. Then use the xmlDocument's SelectSingleNode() method to get the specific row into an xmlNode.

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

    Hi,
 
 I have a xml file which is created by myDataSet.WriteXml(). myDataSet
 contains one datatable which in turn contains several thousands
 rows.
 
 Now I want to select one row (that can be done by a simple select in
 sql) from the xml file. Do I need to restore the dataset first from
 the xml file? Or I can work on the xml file directly?
 
 Thanks.
 
 Michael
 
 
 Posted Via Usenet.com Premium Usenet Newsgroup Services
 ----------------------------------------------------------
 ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
 ----------------------------------------------------------
 http://www.usenet.com

 
 [microsoft.public.dotnet.framework.adonet]



Relevant Pages

  • Re: How to update, remove and insert attributes in an XML file?
    ... load the XML file, and use XPathNavigator to retrieve the nodes. ... use SelectSingleNode or SelectNodes to find the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Retrigger Postback
    ... this logic as early as the Init event is not good as this event and the Load ... >I want to press a button and have it change an XML file. ... Triggering postback twice is definitely no solution! ... >>> Victor Garcia Aprea ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: problem with XML DOM load command
    ... When I try to load a xml file, ... © 2003 Microsoft Corporation. ... All rights ... >> an addition file check before attempting to load an XML file. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: ReadXML - Threading - Static Classes - Progress Indicators
    ... > while ReadXML is reading the xml file, do I have to override the base ... > for read xml or is their a simpler way, the progress bar wouldn't have to ... > how can I fire an event from a thread once a particular part (the ReadXML) ... assumig that you create a new form with the animation and stuff, in the Load ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ADO/SQL-Server LoadFromFile (XML)
    ... the "loadfromfile" only loads the XML file into the ADO cursor ... it doesn't upload it to the server. ... If you want to upload the data to the SQL database, ... load the xml file into a dataset again ...
    (borland.public.delphi.database.ado)