i have a XML file. I have to read the nodes as if records in the database.
e.g. consider the file books.xml below

<books>
 <book>
  <name>Java</name>
  <author>XYZ</author>
  <publication>wrox</publication>
 </book>
 <book>
  <name>C++ Basics</name>
  <author>ABC</author>
  <publication>Microsoft</publication>
 </book>
 .
 .
 .
</books>

i have to read the book node as a record so that i can idenfify its contents
correctly.
I tried with XPath Query as
" books/book/(name | author | publication)"
and used the XPathNAvigator.Select(..) method,tried by
XPathNavigator.Compile(..) method which returns the node set.

but the problem is that this query gives System.Xml.Xpath.XpathException in
the system.xml.dll. The query should return a node set.

how can i solve this problem....
If any other type of logic or query is available please give suggestions and
help.

Infact this type of query is also given as example of Xpath in MSDN.

Dinesh Upare




--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to