This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Transfer Learning for Natural Language Processing (MEAP) and have Paul Azunre on-line!
See this thread for details.
Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

XSL help

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I have XML like

<root>
<table class="aa">
<tr><td>test</td></tr>
</table>
<table class="bb">
<tr><td>new</td></tr>
</table>
<table class="aa">
<tr><td>some</td></tr>
</table>
<table class="bb">
<tr><td>best</td></tr>
</table>

</root>

I need to display test and some. How to write XSL to get only those elements. I can see class="aa" is making differance.

Please help me. I will really appreciate

Thank
 
Marshal
Posts: 25452
65
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An example in XPath should be sufficient. You can use XSLT to implement that XPath if you like, or any other XML implementation that supports XPath.Translation: Find a table element at any depth in the tree whose class attribute has the value "aa", then find its tr children, then find their td children.
 
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic