Hi,
Take the following 4 example XML documents:
<Example> <Colour>orange</Colour> </Example>
<Example> <Car colour="orange">Ford Focus</Car> </Example>
<Example> <County>Orange County</County> </Example>
<Example> <Orange>555</Orange> </Example>
These are all stored in a SQL Server database in a table with a XML datatype column (untyped).
How would I go about running a query looking for all content in the document with the word orange in it, which would return the following documents:
- this has a value orange inside an element.
- this has a value orange inside an attribute.
- this has a value Orange County inside an element (note different casing of the word Orange)
Document 4 should not be returned in the query results as the word orange is an element name and is not a data value.
Is this even possible?
Thanks in advance.