XMLTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Web Features : XMLTools : XMLTools/Validate

XMLTools

  

Validate

  

validate an XML document against a DTD

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Validate(xmlDoc, opts)

Parameters

xmlDoc

-

Maple XML tree; XML element to validate

opts

-

equation(s) of the form option=value where option is one of dtd or schema; specify validation options

Description

• 

The Validate(xmlDoc) command validates an XML element xmlDoc (typically the root element of an XML document). If xmlDoc is determined to be valid according to the specified DTD/schema, then Validate returns true. Otherwise, Validate returns an error containing a description of problems found in the document.

  

The opts argument must be one of the following.

  

dtd=location

  

Specifies the location of the DTD to be used.

  

schema=location

  

Specifies the target no namespace XML Schema Location. If present, xmlDoc's own noNamespaceSchemaLocation attribute is effectively ignored.

  

Note: If neither the dtd option nor the schema option is present, then xmlDoc is checked for well-formedness only.

Examples

withXMLTools:

docParseFiletemp.xml

Validatedoc,schema=schema.xsd

See Also

XMLTools

XMLTools[ParseFile]

XMLTools[ParseString]