XML - Managing Data Exchange/XPath/Exercises

From Wikibooks, open books for an open world
< XML - Managing Data Exchange | XPath
Jump to: navigation, search

XPath Chapter => XPath

XPath Answers => Answers


Below are exercises you can do to hone in on your XPath skills. Use the tree.xml file and xsl-tree.xsl to do the following:

[edit] XPath Tree Example

Modify and copy the xsl-tree.xsl file and rename the copies, indicating the question number.

  1. Print the name attribute of every bigBranch element with thickness set as ‘thick’.
  2. Print the name of the parent of each bigBranch.
  3. Print the color of all leaves with a color attribute.

XPath Chapter => XPath

XPath Answers => Answers

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export