schemas Property (Compact 2013)

3/26/2014

Finds schema documents during load.

Syntax

var objXMLDOMSchemaCollection = objIXMLDOMDocument2.schemas;
objXMLDOMDocument.schemas = objXMLDOMSchemaCollection;
HRESULT get_schemas(
  VARIANT* otherCollection
);
HRESULT putref_schemas(
  VARIANT otherCollection
);

Parameters

Script

None.

C/C++

  • otherCollection
    [out, retval][in] The schema collection that is returned. This is the same object that was previously set, or Null if none has been set.

Return Value

Script

Object. The schema collection that is returned. This is the same object that was previously set, or Null if none has been set.

C/C++

  • S_OK
    Value returned if the method executes successfully and a schema collection is set.
  • S_FALSE (for get_schemas only)
    Value returned if no schema collection is set.
  • E_POINTER (for get_schemas only)
    Value returned if pSchemaCollection = Null.
  • E_FAIL (for putref_schemas only)
    Value returned if an IXMLSchemaCollection interface cannot be obtained from SchemaCollection with formatted IErrorInfo.

Null if no schema collection is currently set. You will always get the same collection object you put in.

Remarks

The schemas property provides a way of associating preloaded schemas with any namespace. It also provides a way to override the schemas that are used by the document you are about to load. Setting a new schema collection has no effect on the current document until the next load or loadXML call. The schemas loaded by the document during load do not automatically get added to this collection.

Setting any non-null schema collection automatically disables document type definition (DTD) processing because you cannot use both DTD and XML schema processing on the same document. This means DTDs will be ignored. Setting the schemas collection to Null re-enables DTD processing.

This property applies to the following objects and interfaces:

XMLSchemaCache/IXMLDOMSchemaCollection, and IXMLDOMDocument2.

Requirements

Header

msxml2.h,
msxml2.idl

See Also

Reference

XML DOM Properties