473,395 Members | 1,647 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,395 software developers and data experts.

xpath for children

Hi all,
Following is a part of an Xml document I am having problems with. I have
a XmlNode variable in my C# application that referes to the mytable node of
the following Xml. Now I need to get all children of mytable node from the
ns0 namespace(myfield1 and myfield2 in this case) using the XmlNode object.
I need a help with Xpath query to achieve this.

Do you think the following statement would work?
mytablenode.SelectNodes("descendant::ns0:*",myname spacemanager);

<ns0:mydataset>
<ns0:mytable>
<w:p>
<ns0:myfield1>value</ns0:myfield1>
</w:p>
<w:p>
<ns0:myfield2>value</ns0:myfield2>
</w:p>
</ns0:mytable>
</ns0:mydataset>
Thanks in advance.
Nov 17 '05 #1
1 1180
Go to http://www.xmlforasp.net/ and watch Dan Wahlin's videos for some good
insight.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


"helpful sql" <no****@stopspam.com> wrote in message
news:ex**************@tk2msftngp13.phx.gbl...
Hi all,
Following is a part of an Xml document I am having problems with. I have
a XmlNode variable in my C# application that referes to the mytable node
of
the following Xml. Now I need to get all children of mytable node from the
ns0 namespace(myfield1 and myfield2 in this case) using the XmlNode
object.
I need a help with Xpath query to achieve this.

Do you think the following statement would work?
mytablenode.SelectNodes("descendant::ns0:*",myname spacemanager);

<ns0:mydataset>
<ns0:mytable>
<w:p>
<ns0:myfield1>value</ns0:myfield1>
</w:p>
<w:p>
<ns0:myfield2>value</ns0:myfield2>
</w:p>
</ns0:mytable>
</ns0:mydataset>
Thanks in advance.

Nov 17 '05 #2

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

Similar topics

2
by: Jeff | last post by:
I'd like to write an XPath expression that gets a node with 2 particular children. I thought this would work: /AAA/BBB/CCC/following-silbing::DDD/parent::node() on xml like this: AAA BBB
7
by: steve bull | last post by:
I have the following code snippet to read the colorRange attributes for the colorRangeSwatch in the xml file listed below. string expr = "/swatches/colorRangeSwatch/colorRange";...
3
by: ArmsTom | last post by:
I've been playing around with xml for a couple days, so I have no idea what I'm doing yet :). Be gentle. Ok, here's what I have... ================================ Do while...
1
by: Simang | last post by:
Hi everyone, I'm an xpath newbie and needed help from all of you. I need to get all elements that do not have any children. Is there such an expression? I would need to use this for the...
1
by: helpful sql | last post by:
Hi all, Following is a part of an Xml document I am having problems with. I have a XmlNode variable in my C# application that referes to the mytable node of the following Xml. Now I need to get...
4
by: cgaden | last post by:
Hi everyone, I have a problem that I've been trying to figure out for a while but I just can't seem to get it right. I have the following XML fragment: <Page ID="x1" Schema="Folder"> -<Page...
2
by: Candle | last post by:
I am new to XML Programming and I am hoping someone can help me out with this. Assuming I have the following XML: <root> <E C="P_E1" O="E1" Y='True'> <A C="P_E1A1" V="7" Y='True'/> <A...
1
by: woodworthjames | last post by:
Hello, not sure i am using xpath correctly. have the following trivial xml. <?:xml version="1.0" standalone="yes" ?> <top attr="1"> content1 content2 <inner id="first" day="friday"> content3...
3
by: Arndt Jonasson | last post by:
Let's say we have a schema (maybe expressed in XML Schema, but not necessarily so), that allows this instance document: <top> <txt>This is text</txt> <books> <book>Tarzan</book> <book>Harry...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.