Re: XML challenge!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Random (cipherlad_at_hotmail.com)
Date: 11/16/04


Date: Tue, 16 Nov 2004 15:00:17 -0800

But if I do this how can I get more than one xml file into the dataset? I
could, I suppose, collect and concatenate all the xml files in the directory
into one master xml document, but then how could I structure the filter to
search in both node and attribute values at the same time?

"Marshal Antony" <dotnetmarshal@hotmail.com> wrote in message
news:eVRbS4CzEHA.352@TK2MSFTNGP14.phx.gbl...
> Hi,
> One easy way is to load your XML file into a dataset and apply your
> filter to the data table.
>
> DataSet ds= new DataSet ( );
>
> // Read your xml file into a dataset
> ds.ReadXml ( Server.MapPath ( "/path/test.xml" ) );
> To do the filtering :
> DataRow[] dataRows =
> ds.Tables[0].Select( select expression);
> then bind to the datagrid
>
> Hope this helps.
> Regards,
> Marshal Antony
> .NET Developer
>
>
>
>
>
> "Random" <cipherlad@hotmail.com> wrote in message
> news:%23Nj3WACzEHA.2788@TK2MSFTNGP15.phx.gbl...
>> Trying to solicit some quick advice on my procedure architecture so I
> don't
>> have to waste too much time with trying different objects. I'm still
>> unfamiliar with a lot of the new XML parsing/manipulation in .NET, so I
>> could really use the help.
>>
>> I have a set of xml files, all in the same directory, adhering to the
>> same
>> schema. I want to implement a keyword search feature, and display the
>> results in a DataGrid control (or GridView, DetailsView, or FormView
> control
>> for .NET 2.0), with the results containing a hyperlink specifying the xml
>> document name and the node name and/or parent node name of the attribute
>> value or node value that matches the keyword(s) being searched (these are
>> the peices of information I need in the query string to parse and display
>> the xml data on another page).
>>
>> To do this, I thought I'd iterate through the files in the directory,
> apply
>> a small set of xpath queries to return an XmlNodeList, that I would then
> add
>> to either a custom business object or xml document, and then DataBind the
>> result to the DataGrid.
>>
>> The sole problem I see with this method is that my XmlNodeList would not
>> contain the info I might require on the parent node, and this would
>> therefore be unavailable for my results.
>>
>> Should I be using something other than a custom xml document, or
>> XmlNodeList? What other methods might work more efficiently?
>>
>>
>
>



Relevant Pages

  • Re: How to manage XML streams in DirectShow filters ?
    ... > I know DirectShow is originally built to be used with pictures, videos, ... > which each filter is used to call a specific function (for pattern ... > simple video rendering graph, which is a quite dirty and ugly trick. ... or plain text like in a xml file) to the ...
    (microsoft.public.win32.programmer.directx.video)
  • DataTable.Select problem in ASP.NET 2.0
    ... I have DataSet which reads data from XML file using DataSet.ReadXML. ... it doesnt recognize that parameter and doesnt return the value, ... DataTable has various rows containing data, now when i try to filter ... method works for some criteria and it doesnt work for some criteria. ...
    (microsoft.public.dotnet.framework.adonet)
  • How to manage XML streams in DirectShow filters ?
    ... which each filter is used to call a specific function (for pattern ... simple video rendering graph, which is a quite dirty and ugly trick. ... What I want to do now is to forget about video in the graph, ... or plain text like in a xml file) to the ...
    (microsoft.public.win32.programmer.directx.video)
  • DataTable.Select problem in ASP.NET 2.0
    ... I have DataSet which reads data from XML file using DataSet.ReadXML. ... it doesnt recognize that parameter and doesnt return the value, ... DataTable has various rows containing data, now when i try to filter ... method works for some criteria and it doesnt work for some criteria. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: generating xml file for visio diagram
    ... Write some sort of XSL transformation for the Visio.vdx file to filter ... out all the stuff you don't care about. ... Create a .NET object structure and serialize it. ... I need to generate xml file for shape objects and there connections in ...
    (microsoft.public.visio.developer.vba)