Obtaining the Text Contained in a Node

You can use the string() function to obtain the text in a node. The string value of an element node is the concatenation of the string values of all text node descendants of the element node in document order. Use one of the following formats:

string string(pathExpression)
               
pathExpression
               

            

Replace pathExpression with the path of the node or nodes that contain the text you want. This can be a rooted path or a relative path. It need not be a single node. If you do not explicitly specify the string() function, you must specify pathExpression in a context where the XPath processor must treat it as a string, for example:

/bookstore/book[title = "Trenton Revisited"]
               

            

The XPath processor obtains the text contained in each title element and compares it with "Trenton Revisited". The XPath processor returns books with the title Trenton Revisited.

For additional information about the string() function, see Converting Objects to Strings.

OASIS Catalogs for Fun and Profit

This tutorial about, Understanding Catalogs, A Use-Case for Catalogs, Registering Catalogs in a Project, Using the DOCTYPE Syntax Sense:X Aid, Navigating Catalogs, Building Composite Catalogs, Converting TR9401 Catalogs to OASIS XML Catalogs and more

Writing Custom XML Adapters

There are cases where the input format is too complicated for Convert to XML, or both reading and writing of the file format is needed. This section will take you through the process of writing a medium-sized adapter in Java.

Web Service Testing Tools

The Stylus Studio Web Service Tester allows you to easily locate, build references to, and test Web services for XML applications based on WSDL, SOAP, and UDDI standard Web service technologies.

SQL Server Tools

Integrated SQL Server Tools in Stylus Studio enable you to access relational data stored in SQL Server 2000 or SQL Server 2005 as XML using XQuery, SQL/XML or ADO - learn how to export relational data as XML today!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member