Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
XPath « XML « Ruby
Ruby
XML
XPath
1.
Get XPath from node
2.
Pass xml node to a method
3.
Navigating a Document with XPath
4.
REXML::XPath.match(doc, '//[@color="green"]')
5.
Find the second green element.
6.
Find the color attributes of all small fish.
7.
Count how many fish are inside the large fish.
8.
each loop on element
9.
Get the first element and first child
10.
Search element by XPath