Which ms technology for searching xml documents?

J

Julia

Hi,
We have an ASP.NET site,and a data base which contains different types of
XML documents
I would like to ask which technology is best to use for searching XML
documents.
My concern is that a 'simple' search on the XML document can retrieve wrong
results
if the search will ignore the fact that the XML have a schema inside
for example assuming I have simple XML

<FirstName>Julia the Last<FirstName>
<LastName>Adriano<LastName>

Running query to look for 'Last' will also find the LastName 'Tag'


Thanks in advance
 
M

Marc Jennings

I would say that XPath is the way to go. That's what it is for, after
all.
 
A

Adam Barker

..NET v2 solves this spectacularly by allowing xpath subqueries in TSQL. In
..NET v1.1 and previous though, you have at least two choices a) use an XML
based database to store your documents, or b) retreive each row and check
contents using XmlDocument.Select() or the other classes in the System.Xml
namespace.
 
J

Jon Skeet [C# MVP]

Julia said:
We have an ASP.NET site,and a data base which contains different types of
XML documents
I would like to ask which technology is best to use for searching XML
documents.
My concern is that a 'simple' search on the XML document can retrieve wrong
results
if the search will ignore the fact that the XML have a schema inside
for example assuming I have simple XML

<FirstName>Julia the Last<FirstName>
<LastName>Adriano<LastName>

Running query to look for 'Last' will also find the LastName 'Tag'

Have you tried XPath? That would be my first port of call.
 

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

Top