revXMLValidateDTD

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
revXMLValidateDTD(<treeID>, <DTDText>)
Associationsxml library
Summary

Checks whether the syntax of an XML tree conforms to a DTD.

Introduced2.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
treeID

The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree.

DTDText

A Document Type Definition.

Example
revXMLValidateDTD(3,field "DTD")
put revXMLValidateDTD(field "Tree",myDTD) into field "Errors"
Values
NameTypeDescription
return

The revXMLValidateDTD function returns empty if the XML tree validates against the DTD.

RelatedGlossary: Standalone Application Settings, validate, standalone application, XML tree, DTD, return, LiveCode custom library
Command: revXMLAddDTD
Function: revXMLCreateTreeFromFile, revXMLCreateTree
Library: XML library
Control Structure: function
Securitydisk
Description

Use the revXMLValidateDTD function to validate an XML tree against a DTD.

If the revXMLValidateDTD function encounters an error, it 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 custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.

Tagstext processing