473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

confused about NameSpace in xml files!


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>&lt;table width='600' cellspacing='0' callpadding='0' border='0'
align='center'&gt;
&lt;tr&gt;&lt;td&gt;&lt;img src='images/ifilmtest.gif' alt='test'
width='175'
height='62'&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;&lt;br&gt;
</Header>
....
....
....
</Form>
Is the problem with NameSpace thing within the xml?


any idea?

Thanks in advance
c# newbie
Nov 12 '05 #1
2 1096
The query works fine on my machine. It returns the 3 nodes I expect it to
<Form>, <Params> and <Header>. There is no problem here nor anything related
to namespaces I can tell.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"C# newbie" <rs****@otxresearch.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...

***************************

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>&lt;table width='600' cellspacing='0' callpadding='0' border='0'
align='center'&gt;
&lt;tr&gt;&lt;td&gt;&lt;img src='images/ifilmtest.gif' alt='test'
width='175'
height='62'&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;&lt;br&gt;
</Header>
...
...
...
</Form>
Is the problem with NameSpace thing within the xml?


any idea?

Thanks in advance
c# newbie

Nov 12 '05 #2
Thanks a lot.

"Dare Obasanjo [MSFT]" <da***@online.microsoft.com> wrote in message
news:OD**************@TK2MSFTNGP09.phx.gbl...
The query works fine on my machine. It returns the 3 nodes I expect it to
<Form>, <Params> and <Header>. There is no problem here nor anything related to namespaces I can tell.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"C# newbie" <rs****@otxresearch.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...

***************************

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>&lt;table width='600' cellspacing='0' callpadding='0' border='0'
align='center'&gt;
&lt;tr&gt;&lt;td&gt;&lt;img src='images/ifilmtest.gif' alt='test'
width='175'
height='62'&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;&lt;br&gt;
</Header>
...
...
...
</Form>
Is the problem with NameSpace thing within the xml?


any idea?

Thanks in advance
c# newbie


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: puzzlecracker | last post by:
after reading some of the post I found out something rather radical to my previous understanding: that when you do #include<iostream> #include<string> #include<vector> etc compiler puts...
2
by: Iyer, Prasad C | last post by:
Actually I am bit confused between the modules and .py file How do I differentiate between the 2. For example I have a file import1.py, import2.py file Which has few functions and classes And...
5
by: Genboy | last post by:
My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1, is no longer compiling for me via the command line. As I have done 600 times in the last year and a half, I can compile to...
29
by: Natan | last post by:
When you create and aspx page, this is generated by default: using System; using System.Collections; using System.Collections.Specialized; using System.Configuration; using System.Text; using...
5
by: Shapper | last post by:
Hello, I am working in a web site where all the code is placed in aspx.vb files. After a while I realized that many functions included in my aspx.vb files where common to all pages. I...
22
by: KvS | last post by:
Hi all, to start with, excuse me, I'm still learning programming alltogether, probably I'm making some fundamental mistake here... I have the files settings.py, GUIclasses.py and main.py in...
4
by: Kevin Newman | last post by:
The primary problem I've had with php is the lack of namespaces, which makes OOP very difficult to organize, since you end up with large number of classes cluttering up the same namespace - which...
7
by: Dylan Parry | last post by:
Hi, I've started to get a bit confused by namespaces and hierarchical organisation in general. What I want to do is something like this: Namespace MyNamespace | |- Class Foo | |- Namespace...
1
by: Giulio Petrucci | last post by:
Hi everybody, I'm getting confused about "which-name-give-to-what" developing my applications using Visual Studio. If I have to develop a "Utilities" library containing some classes for logging...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.