|
Home > Online Product Documentation > Table of Contents > Searching for Strings Searching for StringsThis section provides information about searching for strings. This section discusses the following topics: Finding Identical StringsIn a document, you can search for text that is an exact match with what you specify in your query. For example, consider the following query:
This query finds all
The same query does not return elements like these:
The XPath processor does not return the first
Searches are case sensitive. A search for
Finding Strings That Contain Strings You Specify
To obtain elements that contain a particular string, call the
The
When the first argument is a node list, the XPath processor tests only the string value of the node in the node list that is first in document order. Any subsequent nodes are ignored. Finding Substrings That Appear Before Strings You Specify
To obtain a substring that appears before a string you specify, call the
The
Finding Substrings That Appear After Strings You Specify
To obtain a substring that appears after a string you specify, call the
The
Finding Substrings by Position
To obtain a substring that is in a particular position within its string, call the
The
If you do not specify the third argument, the
More precisely, each character in the string is considered to have a numeric position. The position of the first character is 1. The position of the second character is 2, and so on. The returned substring contains those characters for which the position of the character is greater than or equal to the rounded second argument and, if the third argument is specified, less than the sum of the value of the second and third arguments. The comparisons and addition used for the preceding follow the standard IEEE 754 rules. The XPath processor rounds the second and third arguments as if by a call to the
|
XML-DEV Blog
Join the XML Development discussion at XML-Dev - the hottest place to talk about XML technologies, trends, systems architecture and all the latest buzz. Bookmark this RSS and ATOM feed now!
XSL-List
The XSL-List forum is a valuable learning resource for the Extensible Stylesheet Language (XSL), covering the XSL specification, XSL processor implementations, and XSL user questions. Get this free XSL resource delivered to your inbox today.
Support for the Saxon XQuery Processor
Stylus Studio's XQuery tools feature integrated support for the Saxon SA 8.7.3 XQuery and XSLT processor so you can Edit, Debug and Run XQuery using Saxon. Java code generation support lets you deploy Saxon XQuery applications with just one click.
Convert DTD to XML
Learn how to create a sample XML instance document from a DTD using Stylus Studio DTD to XML conversion tools.