Compartilhar via


schemas Property

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Finds schema documents during load.

Script Syntax

var objXMLDOMSchemaCollection = objIXMLDOMDocument2.schemas;
objXMLDOMDocument.schemas = objXMLDOMSchemaCollection;

Remarks

Script Parameters

None.

Script Return Value

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++ Syntax

HRESULT get_schemas(
  VARIANT* otherCollection
);
HRESULT putref_schemas(
  VARIANT otherCollection
);

Remarks

C/C++ Parameters

  • 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.

C/C++ Return Values

  • 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.

Requirements

Header msxml2.h, msxml2.idl
Windows Embedded CE Windows CE .NET 4.0 and later

General 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.