Which ms technology for searching xml documents?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Julia

    Which ms technology for searching xml documents?


    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>Juli a the Last<FirstName>
    <LastName>Adria no<LastName>

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


    Thanks in advance




  • Marc Jennings

    #2
    Re: Which ms technology for searching xml documents?

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

    On Wed, 1 Jun 2005 11:50:19 +0200, "Julia" <codewizard@012 .net.il>
    wrote:
    [color=blue]
    >
    >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>Jul ia the Last<FirstName>
    ><LastName>Adri ano<LastName>
    >
    >Running query to look for 'Last' will also find the LastName 'Tag'
    >
    >
    >Thanks in advance
    >
    >
    >[/color]

    Comment

    • Adam Barker

      #3
      Re: Which ms technology for searching xml documents?

      ..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.Sel ect() or the other classes in the System.Xml
      namespace.



      "Julia" <codewizard@012 .net.il> wrote in message
      news:uUh$99oZFH A.1512@TK2MSFTN GP10.phx.gbl...[color=blue]
      >
      > 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>Juli a the Last<FirstName>
      > <LastName>Adria no<LastName>
      >
      > Running query to look for 'Last' will also find the LastName 'Tag'
      >
      >
      > Thanks in advance
      >
      >
      >
      >[/color]


      Comment

      • Jon Skeet [C# MVP]

        #4
        Re: Which ms technology for searching xml documents?

        Julia <codewizard@012 .net.il> wrote:[color=blue]
        > 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>Juli a the Last<FirstName>
        > <LastName>Adria no<LastName>
        >
        > Running query to look for 'Last' will also find the LastName 'Tag'[/color]

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

        --
        Jon Skeet - <skeet@pobox.co m>
        Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

        If replying to the group, please do not mail me too

        Comment

        Working...