Click to return to the XML (Extensible Markup Language) home page    
number Method     Information Methods    
Web Workshop  |  XML (Extensible Markup Language)

value Method


Returns a typed version of the value of an element.

Syntax

value()

Remarks

If data typing is not supported or a data type is not provided, this method returns the text value for the element.

For the purposes of comparison, the value method is implied if omitted. In other words, when two items are compared, the comparison operates on the values of the two items.

Note that in the release provided with Microsoft® Internet Explorer 5, this value method does not preserve white space as expected when the xml:space="preserve" setting is present. Use the text property, which processes the white space correctly. You will need to access this property from script not an XSL pattern.

Example

The following pairs of examples are equivalent:

author[last-name!value() = "Bob" and first-name!value() = "Joe"]
author[last-name = "Bob" and first-name = "Joe"]
price[@intl!value() = "canada"]
price[@intl = "canada"]

See Also

XML Data Types Reference



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.