MIXmlDocumentLoadXML() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Loads an XML document using the supplied string.

Syntax

MIXmlDocumentLoadXML( ByVal hXMLDocument As MIXmlDocument, 
	ByVal hContent As CString, pbParsingError As SmallInt,
	ByVal bValidate As SmallInt, ByVal bResolveExternals As SmallInt )
	As SmallInt

hXMLDocument is The MIXmlDocument object handle.

hContent is a CString handle to the string containing the XML string to load into this XML document object. This string can contain an entire XML document or a well-formed fragment.

pbParsingError is a reference to a SmallInt that indicates TRUE (nonzero) if the load succeeded; FALSE (0) if the load failed.

bValidate is a SmallInt that Indicates whether the parser should validate this document. If TRUE (1), it validates during parsing. If FALSE (0), it parses only for well-formed XML.

bResolveExternals is a SmallInt that indicates whether external definitions, resolvable namespaces, document type definition (DTD) external subsets, and external entity references, are to be resolved at parse time, independent of validation. When the bResolveExternals parameter is TRUE (1), external definitions are resolved at parse time. This allows default attributes and data types to be defined on elements from the schema and allows use of the DTD as a file inclusion mechanism. This setting is independent of whether validation is to be performed, as indicated by the value of the bValidate property. If externals cannot be resolved during validation, a validation error occurs. When the value of bResolveExternals is FALSE (0), externals are not resolved and validation is not performed.

Return Value

Nonzero if successful, otherwise 0. To determine the cause of the failure, call the MIGetErrorMessage() function.

Description

Calling MIXmlDocumentLoadXML() on an existing document immediately discards the content of the document. It will work only with UTF-16 or UCS-2 encodings.