Validate - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


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]