Targeting text strings

One of the most significant features of the XPointer language is its ability to target a specific character, word, phrase or sentence of interest, without having to rely upon the presence of an identifying element. For example, the name 'Scarborough' may be of interest in the following text, but the enclosing Paragraph element also contains other text:

<Para>Are you going to Scarborough fair?</Para>

However, the name 'Scarborough' does have an exact location in the document relative to other occurrences and surrounding element structures. But it is not necessary to know and specify the position of the string (in the way that it is necessary to know the identifier or exact location of an element). Instead, an XPointer-based ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.