[1] Copy the table element:
- Copy the entire table element that contains the country names and codes
[2] Editing the XML file:
- Open an empty file
- Save it as "countries.xml"
- Add this line at the top of the XML file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="countries.xsl"?>
- Paste the table element you copied earlier
- Remove the table row that contains "Country names" and "ISO 3166-1-alpha-2 code"
- The screenshot is as below:

- Copy the XPath codes I demonstrated in this article
- Save it as "countries.xsl"
[4] You are all set!
- Here is the sample output translating the XML using XPath

0 comments:
Post a Comment