|
Home > Online Product Documentation > Table of Contents > Specifying Attributes in Queries Specifying Attributes in QueriesTo specify an attribute name in a query, precede the attribute name with an at sign (@). The XPath processor treats elements and attributes in the same way wherever possible. For example:
This query returns the
Following is another query that includes an attribute:
This query returns the three
The following query returns the
If the context node does not have a
The next query returns the
Following is an example that is not valid because attributes cannot have subelements:
Following is a query that finds the
RestrictionsAttributes cannot contain subelements. Consequently, you cannot apply a path operator to an attribute. If you try to, you receive a syntax error. Attributes are inherently unordered. Consequently, you cannot apply a position number to an attribute. If you try to, you receive a syntax error. Attributes and WildcardsYou can use an at sign (@) and asterisk (*) together to retrieve a collection of attributes. For example, the following query finds all attributes in the current context:
|
XML Parser
An XML Parser is a parser that is designed to read XML and create a way for programs to use XML. Learn about Stylus Studio's comprehensive support for all of the world's leading XML Parsers.
Translating X12 Documents to XML
The X12 to XML Converter is a built-in function of the adapter library. The XML that is generated is well commented and indented, and can be used anywhere XML is normally used — with XML Schemas, XSLT, XQuery, etc.
XML Processing
Learn how to simplify XML Processing using Stylus Studio XML Pipeline, the easiest way to visually design and deploy virtually any XML processing tasks.
XML Project
Stylus Studio's Project Window is an intuitive, visual feature for organizing files belonging to a project. It supports different file-type icons and nested folders; many helpful options are available from the context menu.