Tech Write Tips

February 23, 2006

What is: XPATH

Filed under: Future-proofing,Technology — AndyR @ 1:38 pm

XPath is a way of pulling out particular data from an XML document. It is used by XSL to determine what should be output in your documents. It is essentially a systematic way of defining an address of each piece of data.

For example, if you have a nested set of tags:

You can pull out just the surnames by the XPATH expression "person/surname". This returns all the surnames inside the person tag, in our example this would return "AdamsJones".

As well as these addresses, XPath lets you use a raft of functions to work with the data returned from your specified address. For example you can use the UpperCase function to change the case of the output. upper-case(person/surname) returns ADAMSJONES.

For the technical author who wants to dabble at this level, XPath combined with XSL enables you to generate datasheets from raw xml data. If your help content is in an XML compliant form (such as XHTML), these technologies also enable you to transform it to a variety of other formats and medium, such as web or pdf.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: