String Array to XmlNodeList

  • Thread starter Thread starter Maurice Cosgrave
  • Start date Start date
M

Maurice Cosgrave

Hi,

I was wondering if there was a way to move values from an array into an
XmlNodeList? I have the values loaded into a string array from a
previous point in the application; now I need to search the XML file
for the items in the array and pull out the parent node. To do that I
need an XmlNodeList.

Cheers,

Maurice
 
You can load the document to an XMLDocument instance and do XPath
queries based on the data in the array.

This could do what you want.

Regards,
Tasos
 
Maurice said:
I was wondering if there was a way to move values from an array into an
XmlNodeList? I have the values loaded into a string array from a
previous point in the application; now I need to search the XML file
for the items in the array and pull out the parent node. To do that I
need an XmlNodeList.

XmlNodeList is returned by some methods like GetElementsByTagName or
SelectNodes and by the ChildNodes property. You can't construct one
without using these properties or methods unless you implemented your
own class extending XmlNodeList.
Why do you think you need an XmlNodeList? What API are you trying to use
that needs an XmlNodeList?
 
Hi Tasos,

Thanks for the reply. I have to admit I'm relatively new to C# but how
would that help me out with the array I have?

Cheers,

Maurice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top