Name: revXMLValidateDTD

Type: function

Syntax: revXMLValidateDTD(<treeID>, <DTDText>)

Summary: Checks whether the syntax of an <XML tree> conforms to a <DTD>.

Introduced: 2.0

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Security: disk

Example:
revXMLValidateDTD(3,field "DTD")

Example:
put revXMLValidateDTD(field "Tree",myDTD) into field "Errors"

Parameters:
treeID: The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree.
DTDText: A Document Type Definition.

Returns: The <revXMLValidateDTD> <function> <return|returns> empty if the <XML tree> validates against the DTD.

Description:
Use the <revXMLValidateDTD> <function> to <validate> an <XML tree> against a <DTD>.

If the <revXMLValidateDTD> <function> encounters an error, it <return|returns> an error message starting with "xmlerr".

>*Important:*  The <revXMLValidateDTD> <function> is part of the <XML library>. To ensure that the <function> works in a <standalone application>, you must include this <Revolution custom library|custom library> when you create your <standalone application|standalone>. In the Inclusions section on the General screen of the <Standalone Application Settings> window, make sure "XML Library" is selected in the list of script libraries.

References: function (control_st), revXMLAddDTD (command), revXMLCreateTreeFromFile (function), revXMLCreateTree (function), Standalone Application Settings (glossary), validate (glossary), standalone application (glossary), XML tree (glossary), DTD (glossary), return (glossary), XML library (library), Revolution custom library (library)

Tags: text processing
