C
C# newbie
Hi guys,
Something werid happening to me. When I run a query against every xml I
have, below query works fine and returns what it should be returned.
but there is another xml file as below, which doesnt' return what it should!
I run a query like: //*[contains(.,'the string I'm looking for within the
xml goes here')]
runs fine on this: //*[contains(.,'Dylan')]
xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
***************************
runs wrong on:
when I run this //*[contains(.,'center')] it doesn't find center which is
between <Header> and </Header>
<Form FormName="test" FormID="124"
StyleUsage="URL" xmlns="http://www.testdomain.com"
SurveyProgrammer="newbie" DateTime="1/30/2004 6:57:28 PM">
<Params><BackgroundColor>#19384A</BackgroundColor><LinkColor>#ffffff</LinkCo
lor><VisitedLinkColor>#ffffff</VisitedLinkColor>
<TextColor>#ffffff</TextColor><Direction>ltr</Direction><BackgroundImage></B
ackgroundImage>
<Header><table width='600' cellspacing='0' callpadding='0' border='0'
align='center'>
<tr><td><img src='images/ifilmtest.gif' alt='test'
width='175'
height='62'> </td></tr></table><br><br>
</Header>
....
....
....
</Form>
Is the problem with NameSpace thing within the xml?
any idea?
Thanks in advance
c# newbie
Something werid happening to me. When I run a query against every xml I
have, below query works fine and returns what it should be returned.
but there is another xml file as below, which doesnt' return what it should!
I run a query like: //*[contains(.,'the string I'm looking for within the
xml goes here')]
runs fine on this: //*[contains(.,'Dylan')]
xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
***************************
runs wrong on:
when I run this //*[contains(.,'center')] it doesn't find center which is
between <Header> and </Header>
<Form FormName="test" FormID="124"
StyleUsage="URL" xmlns="http://www.testdomain.com"
SurveyProgrammer="newbie" DateTime="1/30/2004 6:57:28 PM">
<Params><BackgroundColor>#19384A</BackgroundColor><LinkColor>#ffffff</LinkCo
lor><VisitedLinkColor>#ffffff</VisitedLinkColor>
<TextColor>#ffffff</TextColor><Direction>ltr</Direction><BackgroundImage></B
ackgroundImage>
<Header><table width='600' cellspacing='0' callpadding='0' border='0'
align='center'>
<tr><td><img src='images/ifilmtest.gif' alt='test'
width='175'
height='62'> </td></tr></table><br><br>
</Header>
....
....
....
</Form>
Is the problem with NameSpace thing within the xml?
any idea?
Thanks in advance
c# newbie