documentation
.HELP!
MSXML 5.0 SDK Documentation
How Do I?
MSXML 5.0 SDK
previous page
next page
Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XPath Developer's Guide
How Do I?
The following tutorials demonstrate common XPath tasks.
Work with Lists of Items Using XPath
Use XPath Axes to Navigate Through XML Data
Construct Complex XPath Searches
previous page
start
next page
Menu
Homepage
Table of contents
MSXML 5.0 SDK
Roadmap to the MSXML SDK
What's New
Installing and Registering the MSXML 5.0 SDK
GUID and ProgID Information
Why Version-Independent GUIDs and ProgIDs Were Removed
Workarounds to Version Independence
Assessing the Impact to Your Environment
MSXML 5.0 GUIDs and ProgIDs
Dependencies in MSXML 5.0
MSXML 5.0 with Internet Explorer
MSXML 5.0 with WinHTTP5
Referencing MSXML 5.0 within VBA Projects
MSXML 5.0 and Windows XP
Creating a Manifest for Your Application
Creating a Manifest for Your Component DLL
Using Visual Basic to Create Sample DLL and EXE Files
Troubleshooting Side-by-Side Installations
Managing MSXML Version Dependencies
Tips for Converting Samples to VBScript
Using Language Filtering
Sample XML File (books.xml)
Copyright and Legal Information
XML Developer's Guide
Starter Kit
Advantages of the XML Format
Creating a Simple XML Document
Displaying the File in Internet Explorer
Concepts
Document Map
Elements
Prolog
XML Declaration
Processing Instructions
DOCTYPE Declaration
Comments
Textual Content
Character and Entity References
Character Encoding, XML, and MSXML
CDATA Sections
Attributes
White Space
Using XML with HTML
Transforming and Querying XML
Formatting XML Documents
Augmenting HTML
Parsers and Parser Types
Using Namespaces in Documents
Reasons for Namespaces
Namespace Prefixes
Declaring Namespaces
Namespace Scope
Using XML on the Server
Instantiating the XML Control
Choosing a Threading Model
Getting the XML Data
Sending XML Between the Client and Server
Saving XML
Converting XML to HTML
XML and Security
Best Practices for Securing MSXML Code
XML Client Security
XML Server Security
XML Data Islands
Binding the XML Data Source Object to Data
Data Islands
Using the XML Data Source Object
Additional Data Binding and XML Resources
How Do I?
Author XML Elements
Author XML Documents
Author XML Data Islands
Use the XML Object Model
Use XML Namespaces
Author XML Schemas
Access Typed XML Values
Use the C++ XML Data Source Object
Use the Master/Detail Feature with the C++ XML Data Source Object
DOM Developer's Guide
Starter Kit
What is XML DOM?
What are the MSXML Helper APIs?
Concepts
Introduction to the DOM
DOM and MSXML
Modeling Documents as Node Trees
Working with the DOM
Additional MSXML Features
How the DOM Works
Working with XML Document Parts
Working with the Document
Working with Elements
Working with Attributes
Working with Text Nodes
Working with CDATA Sections
Working with Processing Instructions
Working with Comments
Working with Entities
Working with Entity References
Working with Document Fragments
Working with the Document Type
Working with Namespaces
Working with Notations
Persistence and the DOM
White Space and the DOM
Enforcing Character Encoding with DOM
How Do I?
Program with DOM in C/C++
Get Ready to Work with MSXML (C/C++)
Set Up My Visual C++ Project
Include Headers and Libraries Manually
Source: loadDOMRaw.cpp
Resource: stocks.xml
Output
Load an XML DOM Object from an XML File (C/C++)
Source: loadDOM.cpp
Resource: stocks.xml
Output
Save an XML DOM Object to a File (C/C++)
Source: saveDOM.cpp
Output
Perform XSL Transformations (C/C++)
Source: XSLT.cpp
Resource: stocks.xml and stocks.xsl
Output
Create an XML Document Dynamically (C/C++)
Source: dynamDOM.cpp
Output
Query XML DOM Nodes (C/C++)
Source: queryNodes.cpp
Resource: stocks.xml
Output
Validate an XML Document or Fragment (C/C++)
Source: validateDOM.cpp
Resource: books.xml and books.xsd
Output
Manage Object Lifetime Using Reference Counting on Interface Pointers (C/C++)
Source: refCount.cpp
Output
Use OnReadyStateChange in Visual C/C++ Applications
Program with DOM in C/C++ Using Smart Pointer Class Wrappers
Get Ready to Work with MSXML (Smart)
Smart Pointer Classes and DOM Methods with an [out, retval] Parameter
Smart Pointer Classes and DOM Properties
Load an XML DOM Object from an XML File (Smart)
Source: loadDOMsmart.cpp
Resource: stocks.xml
Output
Save an XML DOM Object to a File (Smart)
Source: saveDOMsmart.cpp
Output
Perform XSL Transformations (Smart)
Source: XSLTsmart.cpp
Resource: stocks.xml and stocks.xsl
Output
Create an XML Document Dynamically (Smart)
Source: dynamDOMsmart.cpp
Output
Query Nodes from DOM (Smart)
Source: queryNodesSmart.cpp
Resource: stocks.xml
Output
Validate an XML Document or Fragment (Smart)
Source: validateDOMsmart.cpp
Resource: books.xml and books.xsd
Output
Make XML Requests Over HTTP (Smart)
Source: XMLOverHTTP.cpp
Virtual Directory: sxh
Resource: contacts.xml
ASP Page: contact.asp
Output
Program with DOM in Visual Basic
Set Up My Visual Basic Project
Instantiate an XML DOM Object (Visual Basic)
Source: InstantiateDOM.frm
Output
Load an XML File into a DOM Object (Visual Basic)
Source: LoadXMLFile.frm
Resource: test.xml
Output
Serialize an XML DOM Object to a File (Visual Basic)
Source SaveDOM.frm
Output
Perform XSL Transformations (Visual Basic)
Source: XSLT.frm
Resource: test.xml and test.xsl
Output
Create an XML Document Dynamically (Visual Basic)
Source: DynamDOM.frm
Output
Query XML DOM Nodes (Visual Basic)
Source: queryNodes.frm
Resource: stocks.xml
Output
Make XML Requests Over HTTP (Visual Basic)
Source: XMLOverHTTP.frm
Class Module: myHttpRequestHandlers
Virtual Directory: sxh
Resource: contacts.xml
ASP Page: contact.asp
Output
Validate an XML Document or Fragment (Visual Basic)
Source: validateDOM.frm
Resource: books.xml and books.xsd
Output
Use the OnReadyStateChange Property (Visual Basic)
Program with DOM in JScript
Use DOMDocument
Creating a DOMDocument Object
Loading and Saving XML
Getting and Setting Parse Flags
Gathering Document Information
Accessing the Document Tree
Creating New Nodes
Use IXMLDOMNode
Gathering Information About a Node
Getting and Setting Data Within a Node
Navigating the Tree
Manipulating the Children of a Node
Transforming a Node
Use IXMLDOMNodeList
Gathering Information About the Node List
Navigating the Node List
Use IXMLDOMNamedNodeMap
Gathering Information About the Named Node Map
Navigating the Named Node Map
Manipulating a Named Node Map
DOM Reference
XML DOM Enumerated Constants
XML DOM Objects/Interfaces
IXMLDOMAttribute
IXMLDOMAttribute Members
IXMLDOMCDATASection
IXMLDOMCDATASection Members
IXMLDOMCharacterData
IXMLDOMCharacterData Members
IXMLDOMComment
IXMLDOMComment Members
IXMLDOMDocument/DOMDocument
IXMLDOMDocument/DOMDocument Members
IXMLDOMDocument2
IXMLDOMDocument2 Members
IXMLDOMDocument3
IXMLDOMDocumentFragment
IXMLDOMDocumentFragment Members
IXMLDOMDocumentType
IXMLDOMDocumentType Members
IXMLDOMElement
IXMLDOMElement Members
IXMLDOMEntity
IXMLDOMEntity Members
IXMLDOMEntityReference
IXMLDOMEntityReference Members
IXMLDOMImplementation
IXMLDOMImplementation Members
IXMLDOMNamedNodeMap
IXMLDOMNamedNodeMap Members
IXMLDOMNode
IXMLDOMNode Members
IXMLDOMNodeList
IXMLDOMNodeList Members
IXMLDOMNotation
IXMLDOMNotation Members
IXMLDOMParseError
IXMLDOMParseError Members
IXMLDOMParseError2
IXMLDOMParseErrorCollection
IXMLDOMProcessingInstruction
IXMLDOMProcessingInstruction Members
IXMLDOMSchemaCollection/XMLSchemaCache
IXMLDOMSchemaCollection/XMLSchemaCache Members
IXMLDOMSchemaCollection2/XMLDOMSchemaCollection
IXMLDOMSchemaCollection2/XMLDOMSchemaCollection Members
IXMLDOMSelection
IXMLDOMSelection Members
IXMLDOMText
IXMLDOMText Members
XML DOM Properties
allErrors Property
Resource Files (books.xml and books.xsd)
JScript Code (allErrors.js)
Visual Basic Code (allErrors.frm)
C/C++ Code (allErrors.cpp)
Output for the allErrors Example
async Property
attributes Property
baseName Property
childNodes Property
context Property
data Property (IXMLDOMCharacterData)
data Property (IXMLDOMProcessingInstruction)
dataType Property
definition Property
doctype Property
documentElement Property
entities Property
errorCode Property
errorParametersCount Property
errorXPath Property
JScript Code (errorXPath.js)
Visual Basic Code (errorXPath.frm)
C/C++ Code (errorXPath.cpp)
Output for the errorXPath Example
expr Property
filepos Property
firstChild Property
implementation Property
input Property
item Property
JScript Code (item.js)
Visual Basic Code (item.frm)
C/C++ Code (item.cpp)
Output for the item Example
lastChild Property
length Property (IXMLDOMCharacterData)
length Property (IXMLDOMNamedNodeMap)
length Property (IXMLDOMNodeList)
length Property (IXMLDOMParseErrorCollection)
JScript Code (length.js)
Visual Basic Code (length.frm)
C/C++ Code (length.cpp)
Output for the length Example
length Property (XMLSchemaCache/IXMLSchemaCollection)
line Property
linepos Property
name Property (IXMLDOMAttribute)
name Property (IXMLDOMDocumentType)
namespaces Property
namespaceURI Property (IXMLDOMNode)
namespaceURI Property (XMLSchemaCache/IXMLSchemaCollection)
_newEnum Property
Visual Basic Code (enumErrors.frm)
Output for the enumErrors Example
next Property
JScript Code (next.js)
Visual Basic Code (next.frm)
C/C++ Code (next.cpp)
Output for the next Example
nextSibling Property
nodeName Property
nodeType Property
nodeTypedValue Property
nodeTypeString Property
nodeValue Property
notationName Property
notations Property
ondataavailable Property
onreadystatechange Property (DOMDocument)
onreadystatechange Property (IXMLHTTPRequest)
onreadystatechange Property (ServerXMLHTTP/IServerXMLHTTPRequest)
ontransformnode Property
output Property
ownerDocument Property
ownerTemplate Property
parentNode Property
parsed Property
parseError Property
prefix Property
preserveWhiteSpace Property
previousSibling Property
publicId Property (IXMLDOMEntity)
publicId Property (IXMLDOMNotation)
readyState Property (DOMDocument)
readyState Property (IXMLHTTPRequest)
readyState Property (IXSLProcessor)
readyState Property (ServerXMLHTTP/IServerXMLHTTPRequest)
reason Property
resolveExternals Property
responseBody Property (IXMLHTTPRequest)
responseBody Property (ServerXMLHTTPRequest/IServerXMLHTTPRequest)
responseStream Property (IXMLHTTPRequest)
responseStream Property (ServerXMLHTTP/IServerXMLHTTPRequest)
responseText Property (IXMLHTTPRequest)
responseText Property (ServerXMLHTTP/IServerXMLHTTPRequest)
responseXML Property (IXMLHTTPRequest)
responseXML Property (ServerXMLHTTP/IServerXMLHTTPRequest)
schemas Property
specified Property
srcText Property
startMode Property
startModeURI Property
status Property (IXMLHTTPRequest)
status Property (ServerXMLHTTP/IServerXMLHTTPRequest)
statusText Property (IXMLHTTPRequest)
statusText Property (ServerXMLHTTP/IServerXMLHTTPRequest)
stylesheet Property (IXSLProcessor)
stylesheet Property (IXSLTemplate)
systemId Property (IXMLDOMEntity)
systemId Property (IXMLDOMNotation)
tagName Property
target Property
text Property
url Property (DOMDocument)
url Property (IXMLDOMParseError)
validateOnLoad Property
validateOnParse Property
value Property
xml Property
Second-level DOM Properties
AllowDocumentFunction Property
ForcedResync Property
MaxXMLSize Property
MultipleErrorMessages Property
NewParser Property
ResolveExternals Property
SelectionLanguage Property
SelectionNamespaces Property
ServerHTTPRequest Property
UseInlineSchema Property
ValidateOnParse Property
XML DOM Methods
abort Method (DOMDocument)
abort Method (IXMLHTTPRequest)
abort Method (ServerXMLHTTP/IServerXMLHTTPRequest)
add Method
addCollection Method
addObject Method
addParameter Method
appendChild Method
appendData Method
clone Method
cloneNode Method
createAttribute Method
createCDATASection Method
createComment Method
createDocumentFragment Method
createElement Method
createEntityReference Method
createNode Method
createProcessingInstruction Method
createProcessor Method
createTextNode Method
deleteData Method
errorParameters Method
JScript Code (errorParams.js)
Visual Basic Code (errorParams.frm)
C/C++ Code (errorParams.cpp)
Output for the errorParams Example
get Method
getAllResponseHeaders Method (IXMLHTTPRequest)
getAllResponseHeaders Method (ServerXMLHTTP/IServerXMLHTTPRequest)
getAttribute Method
getAttributeNode Method
getDeclaration Method
getElementsByTagName Method (DOMDocument)
getElementsByTagName Method (IXMLDOMElement)
getNamedItem Method
getOption Method
getProperty Method (IXMLDOMDocument2)
getProperty Method (IXMLDOMSelection)
getQualifiedItem Method
getResponseHeader Method (IXMLHTTPRequest)
getResponseHeader Method (ServerXMLHTTP/IServerXMLHTTPRequest)
getSchema Method
hasChildNodes Method
hasFeature Method
importNode Method
Resource Files (importNode.xml and importNode.xsd)
JScript Code (importNode.js)
Visual Basic Code (importNode.frm)
C/C++ Code (importNode.cpp)
Output for the importNode Example
insertBefore Method
Calling insertBefore on Attributes
Calling insertBefore on Documents
Calling insertBefore on Document Fragments
Calling insertBefore on Elements
insertData Method
item Method (IXMLDOMNamedNodeMap)
item Method (IXMLDOMNodeList)
load Method
loadXML Method
matches Method
nextNode Method (IXMLDOMNamedNodeMap)
nextNode Method (IXMLDOMNodeList)
nodeFromID Method
normalize Method
open Method (IXMLHTTPRequest)
open Method (ServerXMLHTTP/IServerXMLHTTPRequest)
peekNode Method
remove Method
removeAll Method
removeAttribute Method
removeAttributeNode Method
removeChild Method
removeNamedItem Method
removeNext Method
removeQualifiedItem Method
replaceChild Method
replaceData Method
reset Method (IXMLDOMNamedNodeMap)
reset Method (IXMLDOMNodeList)
reset Method (IXMLDOMParseErrorCollection)
JScript Code (reset.js)
Visual Basic Code (reset.frm)
C/C++ Code (reset.cpp)
Output for the reset Example
reset Method (IXSLProcessor)
save Method
selectNodes Method
selectSingleNode Method
send Method (IXMLHTTPRequest)
send Method (ServerXMLHTTP/IServerXMLHTTPRequest)
setAttribute Method
setAttributeNode Method
setNamedItem Method
setOption Method
setProperty Method
setProxy Method (ServerXMLHTTP/IServerXMLHTTPRequest)
setProxyCredentials Method (ServerXMLHTTP/IServerXMLHTTPRequest)
setRequestHeader Method (IXMLHTTPRequest)
setRequestHeader Method (ServerXMLHTTP/IServerXMLHTTPRequest)
setStartMode Method
setTimeouts Method
splitText Method
substringData Method
transform Method
transformNode Method
transformNodeToObject Method
validate Method
validate Method (IXMLDOMSchemaCollection2/XMLDOMSchemaCollection)
validateNode Method
Resource Files (validateNode.xml and validateNode.xsd)
JScript Code (validateNode.js)
Visual Basic Code (validateNode.frm)
C/C++ Code (validateNode.cpp)
Output for the validateNode Example
waitForResponse Method
XML DOM Events
ondataavailable Event
onreadystatechange Event
ontransformnode Event
MSXML Helper APIs
XML Helper Objects/Interfaces
IMXNamespaceManager
IMXNamespaceManager Members
IMXNamespacePrefixes
IMXNamespacePrefixes Members
IVBMXNamespaceManager
IVBMXNamespaceManager Members
IXMLHTTPRequest
IXMLHTTPRequest Members
IXSLProcessor
IXSLProcessor Members
IXSLTemplate
IXSLTemplate Members
IServerXMLHTTPRequest/ServerXMLHTTP
IServerXMLHTTPRequest/ServerXMLHTTP Members
IServerXMLHTTPRequest/ServerXMLHTTP Examples
Using ServerXMLHTTP Directly
Using the ServerXMLHTTP Security Options
Using ServerXMLHTTP in a Multitiered Environment
Using the WinHTTP Proxy Configuration Utility
XML Helper Properties
allowOverride Property
item Property
length Property
XML Helper Methods
declarePrefix Method
getDeclaredPrefixes Method
getPrefixes Method
getURI Method
getURIFromNode Method
popContext Method
pushContext Method
pushNodeContext Method
reset Method
getDeclaredPrefix Method (C++)
getPrefix Method (C++)
getURI Method (C++)
XML Digital Signature
XML Digital Signature Developer's Guide
Starter Kit
What Is XML Digital Signature?
Public and Private Key Pair
Certificates and Certificate Authority
Encryption and Decryption
Digital Signature
Digest or Hash
XML Digital Signature
Enveloping Signature
Enveloped Signature
Detached Signature
CAPICOM and CryptoAPI
Getting Started with XML Digital Signatures
Setting Up a Certificate Authority
Requesting a Digital Certificate
Issuing a Certificate for a Pending Request
Installing a Digital Certificate
Installing the Platform SDK and Configuring Visual C++
Downloading and Installing CAPICOM 2.0
XML Digital Signature Reference
XML Digital Signature Interfaces
IXMLDigitalSignature
IXMLDigitalSignatureEx
IXMLDSigKey
IXMLDSigKeyEx
XML Digital Signature Properties
signature Property
Signature Template Requirements for Signing
Signature Document Requirements for Verification
Resource: signature_template,xml
JScript Source: signature.js
Visual Basic Source: signature.frm
C/C++ Source: signature.cpp
Output
store Property
Resource: signature_template.store.rsa,xml
JScript Source: storeProp.js
Visual Basic Source: storeProp.frm
C/C++ Source: storeProp.cpp
Output
XML Digital Signature Methods
createKeyFromCertContext Method
Resource: signature_template.rsa.xml
C/C++ Source: KeyFromCertContext.cpp
Output
createKeyFromCSP Method
Resource: signature_template.rsa.xml
JScript Source: KeyFromCSP.js
Visual Basic Source: KeyFromCSP.frm
C/C++ Source: KeyFromCSP.cpp
Output
createKeyFromHMACSecret Method
Resource: signature-template-enveloping-hmac-sha1.xml
JScript Source: KeyFromHMACSecret.js
Visual Basic Source: KeyFromHMACSecret.frm
C/C++ Source: KeyFromHMACSecret.cpp
Output
createKeyFromHMACSecretBinary Method
Resource: signature-template-enveloping-hmac-sha1.xml
C/C++ Source: KeyFromHMACSecretBinary.cpp
Output
createKeyFromNode Method
Resource: signature.dsa.xml
JScript Source: KeyFromNode.js
Visual Basic Source: KeyFromNode.frm
C/C++ Source: KeyFromNode.cpp
Output
createSAXProxy Method
Resource: signature_template.rsa.xml and test.xml
JScript Source: createSAXProxy.js
Visual Basic Source: createSAXProxy.frm
C/C++ Source: createSAXProxy.cpp
Output
getCSPHandle Method
getStoreHandle Method
getVerifyingCertificate Method
Resource: signature_signed.rsa.cert.xml
JScript Source: getVerifyingCert.js
Visual Basic Source: getVerifyingCert.frm
C/C++ Source: getVerifyingCert.cpp
Output
getVerifyingCertificateContext Method
Resource: signature_signed.rsa.cert.xml
C/C++ Source: getVerifyingCertContext.cpp
Output
setDebugOutput Method
Resource: signature.template.xml
C/C++ Source: setDebugOutput.cpp, DBStream.h, and DBStream.cpp
C/C++ Source: setDebugOutput.cpp
C/C++ Source: DBStream.h
C/C++ Source: DBStream.cpp
Output
setReferenceData Method
Resource: signature_template.setRef.rsa.xml
JScript Source: setRef.js
Visual Basic Source: setRef.frm
C/C++ Source: setRef.cpp
Output
setStoreHandle Method
Resource: signature_template.setStoreHandle.rsa,xml
C/C++ Source: setStoreHandle.cpp
Output
sign Method
Resource: signature_template.sign.rsa.xml
JScript: sign.js
Visual Basic: sign.frm
C/C++ Source: sign.cpp
Output
verify Method
Resource: signature.verify.dsa.xml
JScript Source: verify.js
Visual Basic Source: verify.frm
C/C++ Source: verify.cpp
Output
XML Digital Signature Enumerated Types
XMLDSIG_WRITEKEYINFO Enum
Supported Transforms and Their Namespace URIs
XML Digital Signature Elements
<ds:CanonicalizationMethod> Element
<ds:DigestMethod> Element
<ds:DSAKeyValue> Element
<ds:DigestValue> Element
<ds:KeyInfo> Element
<ds:KeyName> Element
<ds:KeyValue> Element
<ds:Manifest> Element
<ds:MgmtData> Element
<ds:Object> Element
<ds:PGPData> Element
<ds:Reference> Element
<ds:RetrievalMethod> Element
<ds:RSAKeyValue> Element
<ds:Signature> Element
<ds:SignatureMethod> Element
<ds:SignatureProperties> Element
<ds:SignatureProperty> Element
<ds:SignatureValue> Element
<ds:SignedInfo> Element
<ds:SPKIData> Element
<ds:Transform> Element
<ds:Transforms> Element
<ds:X509Data> Element
XML Schemas
XML Schemas Overview
Frequently Asked Questions about Schemas
Comparing Schema Languages
Version and Conformance
XSD Schema Developer's Guide
Concepts
Schema Structures
Definitions and Declarations
Data Type Definitions
Ur-Type Definitions
Simple Type Definitions
Complex Type Definitions
Declaring Attributes
Declaring Elements
Defining Complex Types
Content Models
Groups
Named Model Groups
Attribute Groups
Notation Declarations
Using Content from Other Schemas
Documenting Schemas
Using Other Namespaces
Data Types in Schemas
Primitive and Derived Data Types
Atomic, List, and Union Data Types
Anonymous and Named Data Types
Parts of Data Types
Using Namespaces in Schemas
Validation
Validation Overview
Deterministic and Non-Deterministic Schemas
Using Inline Schemas (XSD)
Example 1: Comparing an Inline to an External Schema
Example 2: Adding a Namespace to the Schema
How Do I?
Validate an XML Document Against an XML Schema Using Visual Basic
Validate an XML Document Against an XML Schema Using Script
Validate an XML Document Against an XML Schema Using C++
XML Schema Reference (XSD)
XML Schema Examples
XML Schema Element Map
XML Schema Elements
all
annotation
any
anyAttribute
appinfo
attribute
attributeGroup
choice
complexContent
complexType
documentation
element
extension (simpleContent)
extension (complexContent)
field
group
import
include
key
keyref
list
notation
redefine
restriction (simpleType)
restriction (simpleContent)
restriction (complexContent)
schema
selector
sequence
simpleContent
simpleType
union
unique
XML Data Types Reference
Primitive XML Data Types
Derived XML Data Types
Data Type Facets
XML Schema Regular Expressions
XML Schema Regular Expressions Reference Chart
Atom
Normal Character
Piece
Quantifier
Branch
Regular Expression
Character Classes
Character Class
Character Class Expression
Character Group
Positive Character Group
Negative Character Group
Character Class Subtraction
Character Range
Character Class Escapes
Character Class Escape
Single Character Escape
Category Escape
Categories
Block Escape
Multi-Character Escape
XML Schema Instance Attributes
nil
noNamespaceSchemaLocation
schemaLocation
type
XDR Schema Developer's Guide
Referencing XDR Schemas in XML Documents
Defining Elements and Attributes
Content Model
Using XDR Schema Data Types
Specifying Data Types
Extensibility
XDR Schemas and the DOM
XDR Schemas and Namespaces
Using Inline XDR Schemas
Representing the XDR Schema as a DTD
XDR Schema Reference
XDR Schema Elements
attribute
AttributeType
datatype
description
element
ElementType
group
Schema
XDR Schema Data Types Reference
XDR Schema Data Types
Primitive XDR Schema Data Types
Supported Data Type Conversions
DTD Developer's Guide
Starter Kit
What is a DTD?
Introduction to DTD Syntax
Authoring DTDs
Concepts
Declaring DTDs
Implementing DTDs
How Do I?
Check for DTD Errors
Validate a Document Against Its DTD
DTD Reference
ATTLIST (Attribute List)
ELEMENT
ENTITY
NOTATION
SOM Developer's Guide
Starter Kit
What is the SOM?
Frequently Asked Questions about the SOM
Practical Uses of the SOM
Creating an Input Form from an XML Schema
Creating a Document Map from an XML Schema
Creating a DTD or XDR Schema from an XML Schema
Creating a SQL Schema from an XML Schema Document
Concepts
Loading an XML Schema for Use with the ISchema Interface
When to Use the SOM
Using the DOM with the SOM
Using SAX with the SOM
Finding Child Elements of Top-Level XML Schema Elements
Things the SOM Cannot Do
How Do I?
Walk the SOM
Instructions for Running the Walk the SOM Application
The Walk the SOM Application
po.xml
po.xsd
po.vbs Step-by-Step
Uncommented Code for the Walk the SOM Application
Locate Declarations
Instructions for Running the Locate Declarations Application
The Locate Declarations Application
po2.xml
po2.xsd
po2.vbs Step-by-Step
Uncommented Code for the Locate Declarations Application
Write Annotations
Instructions for Running the Write Annotations Application
The Write Annotations Application
po3.xsd
po3.vbs Step-by-Step
Uncommented Code for the Write Annotations Application
SOM Reference
XML SOM Enumerated Constants
ISchema Interface
attributeGroups Property
attributes Property
elements Property
modelGroups Property
notations Property
schemaLocations Property
targetNamespace Property
types Property
version Property
ISchemaAny Interface
namespaces Property
processContents Property
ISchemaAttribute Interface
defaultValue Property
fixedValue Property
isReference Property
scope Property
type Property
use Property
ISchemaAttributeGroup Interface
anyAttribute Property
attributes Property
ISchemaComplexType Interface
anyAttribute Property
attributes Property
contentModel Property
contentType Property
isAbstract Property
prohibitedSubstitution Property
ISchemaElement Interface
defaultValue Property
disallowedSubstitutions Property
fixedValue Property
identityConstraints Property
isAbstract Property
isNillable Property
isReference Property
scope Property
substitutionGroup Property
substitutionGroupExclusions Property
type Property
ISchemaIdentityConstraint Interface
fields Property
referencedKey Property
selector Property
ISchemaItem Interface
id Property
itemType Property
name Property
namespaceURI Property
schema Property
unhandledAttributes Property
writeAnnotation Method
ISchemaItemCollection Interface
item Property
length Property
itemByName Method
itemByQName Method
ISchemaModelGroup Interface
particles Property
ISchemaNotation Interface
publicIdentifier Property
systemIdentifier Property
ISchemaParticle Interface
maxOccurs Property
minOccurs Property
ISchemaStringCollection Interface
item Property
length Property
ISchemaType Interface
baseTypes Property
derivedBy Property
enumeration Property
final Property
fractionDigits Property
length Property
maxExclusive Property
maxInclusive Property
maxLength Property
minExclusive Property
minInclusive Property
minLength Property
patterns Property
totalDigits Property
variety Property
whitespace Property
isValid Method
XSLT Developer's Guide
Starter Kit
What is XSLT?
XSLT is a Programming Language
Hello, World! (XSLT)
XSLT is Rule-based
Behind the Scenes
XSLT Processing at a Glance
Tree Representation and XPath
Linking XSLT to a Source XML Document
Frequently Asked Questions about XSLT
Creating XSLT Solutions
Deploying XSLT Solutions
Deploying XSLT in Internet Explorer
Deploying XSLT on the Client
Deploying XSLT on the Server
Supported XSLT Features
XSLT Utilities and Samples You Can Download
Concepts
Understanding the XSLT Process
XSLT Document Map
Sample Files for the XSLT Document Map
XML Declaration in an XSLT File
XSLT Style Sheet Declaration
Namespace Prefix Declarations
Namespace Prefixes in XSLT
Output Method Declarations
XSLT Variables and Parameters
Template Rules
Literal Result Elements in XSLT Files
XPath Expressions
Comments in XSLT
<xsl:for-each> Loops
XPath Functions and XSLT Functions
Conditional Statements
External Document References
The XSLT Processor
Working with a Source Tree
XPath Nodes Example
Names and Values of XPath Nodes
Processing Template Rules
Processing Multiple Matching Template Rules
Understanding the Built-in Template Rules
Linking to an XSLT File
Linking Using a Processing Instruction
Linking Using the DOM
Using XSLT with Cascading Style Sheets
Using CSS as a Stand-alone Style Sheet
Using CSS within an XSLT Style Sheet
Comparing XSLT to Cascading Style Sheets
XSLT Output
Template-Driven Transformations
Creating and Populating an HTML Template
Generating Well-Formed HTML Using XSLT
Selecting and Outputting Attributes
Sorting XML Using <xsl:sort>
Defining Conditional Templates Using <xsl:if> and <xsl:choose>
Defining Conditional Templates Using <xsl:if>
Defining Conditional Templates Using <xsl:choose>
Data-Driven Transformations
Handling Irregular Data Hierarchies
Dissection of the pole.xml Example
Combining Data-Driven and Template-Driven Transformations
Example of Transforming Irregular Data Hierarchies
Defining Match Patterns in <xsl:template>
Debugging a Style Sheet
Using the Built-in Template Rules
Translating from One XML Schema to Another
Generating Comments, Processing Instructions, and Elements
Displaying Transformation Results
Displaying XML Files in a Browser
Using the Default Style Sheet
Using an External Style Sheet
Using Cascading Style Sheets to Display Results
Incorporating <STYLE> Elements into an XSLT File
Using the <STYLE> Element with Older Browsers
Using an External Cascading Style Sheet
Using Namespaces with CSS
XSLT Requirements for Viewing XML in a Browser
Accessing XML and XSLT Documents from Script
Serving Out XML Files from an HTTP Server
Using XSLT with the DOM or SAX
Using XSLT with the DOM
Using XSLT with the DOM from an HTML Page
Implementing Error Handling with XSLT and the DOM
XSLT HTML DOM File with Error Handling
Increasing Performance by Using the XSLTemplate Object
Using XSLT with SAX
Using XSLT within ASP
Getting Transformation Results as a DOM Document
Performing Error Handling with XSLT
Transforming XML Data Islands in an HTML Page
XSLT Sample: Breakfast Menu
Using XPath Expressions to Select Nodes
Using XSLT Variables and Parameters
Initial XSLT Example Using Variables
Using Variables to Store Values that Do Not Change
Using Variables as Convenience Constants
Using Variables to Cache XPath Expressions
Using Parameters to Store Values that Change
Passing Data between Template Rules Using Local Parameters
Passing Values into XSLT Using Global Parameters
Finished XSLT Example Using Variables
Sorting with XSLT
Basic Sorting in XSLT
Sorting in Document Order by Default
Sorting by a Single Column
Sorting by Two Columns
Sorting Data by Numeric Value
Sorting on Calculated Variables
Step 1: Cloning the Source Tree
Step 2: Creating the New Element
Step 3: Sorting the Source Tree Clone
Sample XML Data File for XSLT Sorting
Sample XSLT File for Sorting
Working with Namespaces and Prefix Aliases
Introduction to Namespaces in XSLT
Declaring Namespaces for XSLT
Example of Declaring Namespaces in XSLT
Changing Namespace Aliases Programmatically
Using msxsl:node-set() to Process Result-Tree Fragments
Introduction to Result Tree Fragments
Declaring the msxsl: Namespace Prefix
Processing a Tree Fragment as a Tree by Using msxsl:node-set()
Calculating a Sum of Sums Using msxsl:node-set()
Initial Example for Sum of Sums
Calculating a Sum of Sums (First Attempt)
Calculating a Sum of Sums (Second Attempt)
Calculating a Sum of Sums (Final Version)
Using Named Template Rules in XSLT
Initial Example for Named Templates
Using Named Templates for Frequently Used Templates
Passing Parameters Using Named Templates
Finished Example for Named Templates
Inserting Automatic Numbering Using XSLT
Inserting Automatic Numbering Using position()
Inserting Automatic Numbering Using <xsl:number>
Using level="multiple" for Numbering
Using level="single" for Numbering
Using level="any" for Numbering
Example of Automatic Numbering with <xsl:number>
Importing and Including Style Sheets
Initial Example for Importing Style Sheets
Using <xsl:include> to Insert an XSLT File
Using <xsl:import> to Insert an XSLT File with Lower Precedence
Deciding Whether to Import or Include an XSLT File
Avoiding Conflicting Rules by Using <xsl:apply-imports>
Finished Example for Importing and Including
Using XSLT Keys to Increase Performance
Deciding whether to Use IDs or Keys
Using the <xsl:key> Element
Using the key() Function
Sample XML Data File for XSLT Keys
Sample XSLT File for XSLT Keys
Using XSLT Keys to Group Data
Grouping Data by Examining the Keyed Node-set
Grouping Data by Using generate-id()
Creating Interactive XSLT
Using ASP with XSLT Processor and Template Objects
Sample XSLT File for ASP XSLT Processor Objects
Sample ASP Script for XSLT Processor Objects
Using XML Data Islands and Client-Side XSLT
Sample HTML File for XML Data Islands
Controlling Output Format with the media-type Attribute
Controlling White Space with XSLT
How White Space is Handled in XML Files
How the MSXML Processor Parses White Space
Inserting White Space Using <xsl:text>
Preserving or Stripping White Space
Example of <xsl:preserve-space> and <xsl:strip-space>
Overriding <xsl:preserve-space> and <xsl:strip-space>
Preserving Markup Characters by Using CDATA Sections
Stripping White Space Using normalize-space()
Controlling White Space with the DOM
How the Browser Handles the preserveWhiteSpace Property
Controlling White Space Using the Style Sheet
Controlling White Space Using the MSXML Processor
How Do I?
Initiate XSLT in a Script
Represent Data in XML
Reference Data Values
Use CSS in XSLT
Perform Iterations
Operate on Data Values
Control the Flow of Transformation
Process Multiple XML Documents
Final Results of the XSLT How Do I? Examples
XML Source Document (Sales.xml)
XSLT Transformation File (Transform.xsl)
Additional XML Document (Ancillary.xml)
XSLT Output File (in HTML Format)
XSLT Reference
XSLT Elements
<xsl:apply-imports> Element
Example 1 of <xsl:apply-imports>
Example 2 of <xsl:apply-imports>
<xsl:apply-templates> Element
Example of <xsl:apply-templates>
<xsl:attribute> Element
Example 1 of <xsl:attribute>
Example 2 of <xsl:attribute>
Example 3 of <xsl:attribute>
<xsl:attribute-set> Element
Example of <xsl:attribute-set>
<xsl:call-template> Element
Example of <xsl:call-template>
<xsl:choose> Element
<xsl:comment> Element
<xsl:copy> Element
<xsl:copy-of> Element
<xsl:decimal-format> Element
Example of <xsl:decimal-format>
<xsl:element> Element
<xsl:fallback> Element
Example of <xsl:fallback>
<xsl:for-each> Element
<xsl:if> Element
Example 1 of <xsl:if>
Example 2 of <xsl:if>
Example 3 of <xsl:if>
Example 4 of <xsl:if>
<xsl:import> Element
<xsl:include> Element
Example of <xsl:include>
<xsl:key> Element
Example of <xsl:key>
<xsl:message> Element
Example of <xsl:message>
<xsl:namespace-alias> Element
Example of<xsl:namespace-alias>
<xsl:number> Element
<xsl:otherwise> Element
<xsl:output> Element
Example 1 of <xsl:output>
Example 2 of <xsl:output>
<xsl:param> Element
<xsl:preserve-space> Element
<xsl:processing-instruction> Element
<msxsl:script> Element
<xsl:sort> Element
<xsl:strip-space> Element
<xsl:stylesheet> Element
<xsl:template> Element
<xsl:text> Element
<xsl:transform> Element
<xsl:value-of> Element
<xsl:variable> Element
<xsl:when> Element
<xsl:with-param> Element
XSLT Functions
current Function
document Function
element-available Function
format-number Function
function-available Function
generate-id Function
key Function
node-set Function
system-property Function
unparsed-entity-uri Function
XSLT Syntax
Qualified Names
NaN Values
Expressions
Patterns
XPath Developer's Guide
Starter Kit
What is XPath?
Introduction to XPath Syntax
XPath Tutorial Application
Concepts
Introduction to the XPath Tree Model
Overview of XPath Axes and Node Relationships
Sample XML File for XPath Tree Model
Sample Tree for the Document Root
Sample Document Root Element Sub-Tree
Basic Syntax of XPath Expressions
Overview of XPath Syntax
Constructing an XPath Location Step
Constructing the Node-Test Portion of a Location Step
Specifying the Axis Portion of a Location Step
Constructing the Predicate Portion of a Location Step
Understanding XPath Usage in XSLT
Differences between XPath Expressions and XSLT Patterns
How XSLT Defines the Context for XPath Expressions
How XSLT Template Rules Depend on Context
Determining the Current Context in an XSLT Application
Using XPath with the DOM
How the DOM Defines the Context for XPath Expressions
How to Specify Namespace in XPath Expressions
Sample XML File for DOM Context
Sample XSLT File for DOM Context
Sample Formatted Output for DOM Context
Context and Navigation in XPath
Determining the Context Node
Determining the Context Size
Determining the Context Position
Determining the Current Node
Understanding How the Context Node Changes
Sample XML Data File for XPath Context and Navigation
Navigating XML Data with XPath Axes
Filtering XML Data Using XPath Predicates
Introduction to Filtering with XPath Predicates
Testing within a Predicate by Using Boolean Operators
Sample XML Data File for Boolean Operators in Predicates
Sample XSLT File for Boolean Operators in Predicates
Sample Output for Boolean Operators in Predicates
Testing the Context Position by Using a Numeric Shortcut
Specifying Multiple Predicates in a Single XPath Step
Using Functions in XPath Expressions
Introduction to XPath Functions
Processing Node-Sets by Using Node-Set Functions
Processing Text Strings by Using String Functions
Testing an Expression by Using Boolean Functions
Using Numeric Functions to Perform Math Operations in XPath
Using Numeric Operators to Perform Math Operations in XPath
Using XSLT Functions in XPath Expressions
Sample XML Data File for XPath Functions
Useful Patterns for XPath Expressions
Useful Patterns for XPath Wildcards and Axes
Useful Boolean Predicates in XPath Expressions
Common Use of Predicate Filtering in XPath Expressions
How Do I?
Work with Lists of Items Using XPath
Placing a List of Items into a Table
Creating a Comma-Separated List of Items
Use XPath Axes to Navigate through XML Data
Navigating Along the child Axis
Navigating Along the descendant Axis
Navigating Along the parent Axis
Navigating Along the ancestor Axis
Navigating Along the following Axis
Navigating Along the preceding Axis
Navigating Along the following-sibling Axis
Navigating Along the preceding-sibling Axis
Navigating Along the attribute Axis
Navigating Along the namespace Axis
Navigating Along the self Axis
Navigating Along the descendant-or-self Axis
Navigating Along the ancestor-or-self Axis
Using Abbreviations in XPath Expressions
Sample XML File for Navigating XPath Axes
Sample XSLT File for Navigating XPath Axes
Construct Complex XPath Searches
Constructing an XPath with Axis, Node Test, and Predicate
Constructing a Multi-step XPath Expression
Constructing a Compound Location Path Using Union
XPath Reference
XPath Syntax
Context for XPath Expressions
Operators and Special Characters
Collections
Filters and Filter Patterns
Boolean, Comparison, and Set Expressions
Comparisons
Set Operations
Location Paths
Location Steps
Axes
Node Tests
Name Tests
Node Type Tests
Targeted Processing Instruction Tests
Predicates
Location Path Examples
XPath Examples
Sample XML File for XPath Syntax (inventory.xml)
XPath Functions
Node-Set Functions
count Function
id Function
last Function
local-name Function
name Function
namespace-uri Function
position Function
String Functions
concat Function
contains Function
normalize-space Function
starts-with Function
string Function
string-length Function
substring Function
substring-after Function
substring-before Function
translate Function
Boolean Functions
boolean Function
false Function
lang Function
not Function
true Function
Number Functions
ceiling Function
floor Function
number Function
round Function
sum Function
Microsoft XPath Extension Functions
Defining Namespace Prefixes for Extension Funtions
Using XPath Extension Functions for XSD Support
The XML Document (books.xml)
The XSD Schema (books.xsd)
Visual Basic XSD Extension Function Code
ms:type-is Function
ms:type-local-name([node-set]) Function
ms:type-namespace-uri ([node-set]) Function
ms:string-compare Function
ms:schema-info-available Function
ms:utc Function
ms:namespace-uri Function
ms:local-name Function
ms:number Function
ms:format-date Function
ms:format-time Function
SAX2 Developer's Guide
Starter Kit
What is SAX?
Frequently Asked Questions about SAX2
JumpStart for Creating a SAX2 Application
JumpStart for Creating a SAX2 Application with Visual Basic
Overview of the JumpStart Application (Visual Basic)
Implementing the ContentHandler (Visual Basic)
Implementing the ErrorHandler
Creating the Main Form
JumpStart for Creating a SAX2 Application with C++
Overview of the JumpStart Application (C++)
Implementing the ContentHandler (C++)
Creating the Header File
Creating the MyContent Class
Creating the Main Program
Resource Listings for the SAX2 JumpStart Application
Creating C++ Applications Using SaxAppWizard
Concepts
How Events-Based Parsing Works
Receiving Events with SAX
Choosing Between SAX and DOM
When Should I Use SAX?
When Should I Use DOM?
How Do I?
Create a Simple Filter
Overview of the Simple Filter Application
Application Form (Simple Filter)
How Filter Criteria is Set
ContentHandlerImpl Class
Essential Handler Methods
Run the Application
Validate Documents Using SAX
Overview of the SAX Validator Application
Sample XSD Schema File (SAX Validator)
Application Form (SAX Validator)
MyValidator Class (SAX Validator)
Run the Application (SAX Validator)
How the SAX Validator Application Works
Create a DOMDocument Object from SAX Events
Overview of the SAX to DOM Example
Setting a DOMDocument Object as MXXMLWriter Output
SAX to DOM Implementation Notes
Convert DOM to SAX
Overview of the DOM to SAX Example
Providing a DOMDocument Object as a Parse() Parameter
Use MXXMLWriter
Overview of the Sample MXXMLWriter Application
Connecting an MXXMLWriter to a SAXXMLReader
Configuring MXXMLWriter Output
Manually Building an XML Document with MXXMLWriter
Extract Data From a Large Document
Overview of the XML Extractor Application
Sample Files (XML Extractor)
Application Forms (XML Extractor)
MyExtractor Class (XML Extractor)
Run the Application (XML Extractor)
How the XML Extractor Application Works
SAX2 Reference
IMXAttributes Interface
addAttribute Method
addAttributeFromIndex Method
clear Method
removeAttribute Method
setAttribute Method
setAttributes Method
setLocalName Method
setQName Method
setType Method
setURI Method
setValue Method
IMXSchemaDeclHandler Interface
schemaElementDecl Method
IMXWriter Interface
flush Method
byteOrderMark Property
disableOutputEscaping Property
encoding Property
indent Property
omitXMLDeclaration Property
output Property
standalone Property
version Property
MXHTMLWriter CoClass
flush Method
byteOrderMark Property
disableOutputEscaping Property
encoding Property
indent Property
omitXMLDeclaration Property
output Property
standalone Property
version Property
MXXMLWriter CoClass
flush Method
byteOrderMark Property
disableOutputEscaping Property
encoding Property
indent Property
omitXMLDeclaration Property
output Property
standalone Property
version Property
ISAXAttributes Interface
getIndexFromName Method
getIndexFromQName Method
getLength Method (C/C++)
getLocalName Method
getName Method (C/C++)
getQName Method
getType Method
getTypeFromName Method
getTypeFromQName Method
getURI Method
getValue Method
getValueFromName Method
getValueFromQName Method
length Property (Visual Basic)
ISAXContentHandler Interface
characters Method
endDocument Method
startDocument Method
endElement Method
startElement Method
ignorableWhitespace Method
endPrefixMapping Method
startPrefixMapping Method
processingInstruction Method
putDocumentLocator Method (C/C++)
skippedEntity Method
documentLocator Property (Visual Basic)
ISAXDeclHandler Interface
attributeDecl Method
elementDecl Method
externalEntityDecl Method
internalEntityDecl Method
ISAXDTDHandler Interface
notationDecl Method
unparsedEntityDecl Method
ISAXEntityResolver Interface
resolveEntity Method
ISAXErrorHandler Interface
error Method
fatalError Method
ignorableWarning Method
ISAXLexicalHandler Interface
comment Method
endCDATA Method
startCDATA Method
endDTD Method
startDTD Method
endEntity Method
startEntity Method
ISAXLocator Interface
columnNumber Property (Visual Basic)
lineNumber Property (Visual Basic)
publicId Property (Visual Basic)
systemId Property (Visual Basic)
getColumnNumber Method (C/C++)
getLineNumber Method (C/C++)
getPublicId Method (C/C++)
getSystemId Method (C/C++)
ISAXXMLFilter Interface
getParent Method (C/C++)
putParent Method (C/C++)
parent Property (Visual Basic)
ISAXXMLReader Interface
getFeature Method
putFeature Method
getProperty Method
putProperty Method
parse Method
parseURL Method
baseURL Property (Visual Basic)
contentHandler Property (Visual Basic)
dtdHandler Property (Visual Basic)
entityResolver Property (Visual Basic)
errorHandler Property (Visual Basic)
secureBaseURL Property (Visual Basic)
getBaseURL Method (C/C++)
putBaseURL Method (C/C++)
getContentHandler Method (C/C++)
putContentHandler Method (C/C++)
getDTDHandler Method (C/C++)
putDTDHandler Method (C/C++)
getEntityResolver Method (C/C++)
putEntityResolver Method (C/C++)
getErrorHandler Method (C/C++)
putErrorHandler Method (C/C++)
getSecureBaseURL Method (C/C++)
putSecureBaseURL Method (C/C++)
SAX2 C++ Common Notices
SAX2 Visual Basic Common Notices
XML Glossary
Get in touch
Submit feedback about this site to:
[email protected]