4D v14.3

SAX ADD XML DOCTYPE

Home

 
4D v14.3
SAX ADD XML DOCTYPE

SAX ADD XML DOCTYPE 


 

SAX ADD XML DOCTYPE ( document ; docType ) 
Parameter Type   Description
document  DocRef in Reference of open document
docType  String in DocType to be added

The SAX ADD XML DOCTYPE command adds a DocType statement set by the docType parameter in the XML document referenced by document.

The DocType statement lets you indicate the type of XML in which the document has been written and to specify the Document Type Declaration (DTD) used. A DocType statement generally takes the following form: <!DOCTYPE XML_type "DTD_address">.

Example  

The following statement:

 vDocType:="SYSTEM Books \"Book.DTD\""
 SAX ADD XML DOCTYPE($DocRef;vDocType)

... will write the following line in the document:

 <!DOCTYPE SYSTEM Books"Book.DTD">

If the command has been executed correctly, the system variable OK is set to 1. Otherwise, it is set to 0.

In the event of an error, the the command returns an error which can be intercepted using an error-handling method.

 
PROPERTIES 

Product: 4D
Theme: XML SAX
Number: 851

The OK variable is changed by the commandThis command modifies the Error system variable

 
HISTORY 

Created: 4D 2004

 
SEE ALSO 

SAX ADD XML COMMENT

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)