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

I know that's a .Net forum, but some Xml please...

I've a trouble with xml, I need to access "a node with child that had some
specific text". Somebody can help me?

Thanks a lot

example:

xsl file:
<xsl:template match="Group[@Name='artigos']"> <!-- that`s works-->
<xsl:apply-templates select="Item"></xsl:apply-templates>
</xsl:template>

<xsl:template match="expression"> <!-- that template need to get the node
indicate in the xml below-->
<tr>
<td>
<!-- Do something very complicated, usefull and coll -->
</td>
</tr>
</xsl:template>

xml file:

<Group Name="artigos">
<Item> <!-- the template need to get that "Item"
because Item/Info[8] = 'baseA' -->
<Info>1</Info>
<Info>1</Info>
<Info>0</Info>
<Info>Pagina com box</Info>
<Info>23/11/2004</Info>
<Info>A lot of text<Info/>
<Info/>
<Info>Home</Info>
<Info>baseA</Info>
</Item>
<Item>
<Info>1</Info>
<Info>1</Info>
<Info>0</Info>
<Info>Pagina com box</Info>
<Info>23/11/2004</Info>
<Info>A lot of text<Info/>
<Info/>
<Info>Home</Info>
<Info>baseB</Info>
</Item>
</Group>


Nov 19 '05 #1
2 1023
The XPath for that would look something like:

//*[./text() = 'some specific text']

But if your node needs to be more specific, then:

//TheSpecificNodeName[./text() = 'some specific text']

You can download a great XML book called "Essential XML Quick Reference"
from DevelopMentor's website (click on the blue "d" circle to download):

http://www.develop.com/us/technology...torseries.aspx

I use this any and every time I need to do some XSLT, XPath or XSD work.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I've a trouble with xml, I need to access "a node with child that had
some specific text". Somebody can help me?

Thanks a lot

example:

xsl file:
<xsl:template match="Group[@Name='artigos']"> <!-- that`s works-->
<xsl:apply-templates select="Item"></xsl:apply-templates>
</xsl:template>
<xsl:template match="expression"> <!-- that template need to get the
node
indicate in the xml below-->
<tr>
<td>
<!-- Do something very complicated, usefull and coll -->
</td>
</tr>
</xsl:template>
xml file:

<Group Name="artigos">
<Item> <!-- the template need to get that
"Item"
because Item/Info[8] = 'baseA' -->
<Info>1</Info>
<Info>1</Info>
<Info>0</Info>
<Info>Pagina com box</Info>
<Info>23/11/2004</Info>
<Info>A lot of text<Info/>
<Info/>
<Info>Home</Info>
<Info>baseA</Info>
</Item>
<Item>
<Info>1</Info>
<Info>1</Info>
<Info>0</Info>
<Info>Pagina com box</Info>
<Info>23/11/2004</Info>
<Info>A lot of text<Info/>
<Info/>
<Info>Home</Info>
<Info>baseB</Info>
</Item>
</Group>


Nov 19 '05 #2
Brock,
Good XML link tutorial
Thx mate

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3

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

Similar topics

11
by: Pflanzen Gold | last post by:
Hi, When entering a password we don't really see the characters - we see **** instead. How can I write such a routine in C? How can I 'echo off' the inputs? How can I get a characters/strings...
5
by: Shapper | last post by:
Hello, I know this has nothing to do with ASP.Net but since I know people in this forum know a lot about programming maybe someone knows this: Does anyone know a good javascript forum? I need...
1
by: vssp | last post by:
hai friends I need to add the forum featue to my application.I need some ideas ,suggestion how to develope the forum featute or any sample code avialbele .Please help me __________________...
0
by: Lester Knutsen | last post by:
A two-day IBM Informix and DB2 User Group Technical Conference - Friday and Saturday, December 8-9, 2006 We are very please to announce our Keynote Speakers...
0
by: Lester Knutsen | last post by:
A two-day IBM Informix and DB2 User Group Technical Conference - Friday and Saturday, December 8-9, 2006 Location - Fairview Park Marriott, Falls Church, VA (near Washington D.C.)...
1
by: DaBrain | last post by:
If you got the answer, thank you so much. OK I have to ask this question again as I know it can’t be that difficult, nor is it that rare. So a lot of people are doing something wrong, but...
0
by: kavan | last post by:
hello dear all please kindly explain me. I want to know how can i know when user close the browser. I found many sample in some forum but i don't think it not a good...
1
seshu
by: seshu | last post by:
Guys just give a glance over it Plzzz hi every body Is there any thing like final conclution on final code in this forum what i mean is every time when i seach for a perticular...
2
by: michaelb | last post by:
Please follow this site's Posting Guidelines when posting questions or answers. Some highlights from the Guidelines: Make a meaningful title for your thread. "Please Help!" is not one of those....
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.