ATMI C Function Reference
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
tpxmltofml()
—Converts XML data to FML buffers
#include <fml.h>
int tpxmltofml (char *xmlbufp, char *vfile, FBFR **fmlbufp, char **rtag, long flags)
This function is used to convert XML data to FML buffers. It supports the following valid arguments:
The argument is the fully qualified path name of an XML Schema file used to validate XML input. To use this argument, you must set the TPXPARSNSPACE
and TPXPARSDOSCHE
flags and not set the TPXPARSNEVER
flag.
This argument is used in XML to FML/FM32L conversion to map to a Tuxedo 9.x subset of Xerces parser classes (see, XercesParser 2.5 documentation). The following is a list of Tuxedo 9.x valid Xerces parser flags
:
Sets setValidationSchemaFullChecking
to true. This flag allows the user to turn full Schema constraint checking on/off. Only takes effect if Schema validation is enabled. If turned off, partial constraint checking is done. Full schema constraint checking includes those checking that may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
Sets setValidationConstraintFatal
to true. This flag allows users to set the parser's behavior when it encounters a validation constraint error. If set to true, and the parser will treat validation error as fatal and will exit depends on the state of getExitOnFirstFatalError
. If false, then it will report the error and continue processing.
Sets setCreateEntityReferencNodes
to false. This flag allows the user to specify whether the parser should create entity reference nodes in the DOM tree being produced. When the create flag is true, the parser will create EntityReference nodes in the DOM tree. The EntityReference nodes and their child nodes will be read-only. When the create flag is false, no EntityReference nodes will be created.The replacement text of the entity is included in either case, either as a child of the Entity Reference node or in place at the location of the reference.
Sets setIncludeIgnorableWhitespace
to false. This flag allows the user to specify whether a validating parser should include ignorable whitespaces as text nodes. It has no effect on non-validating parsers which always include non-markup text.
When set to false, all ignorable whitespace will be discarded and no text node is added to the DOM tree.
Sets setcacheGrammarFromParse
to true. This flag allows users to enable or disable caching of grammar when parsing XML documents. When set to true, the parser will cache the resulting grammar for use in subsequent parses. If the flag is set to true, the Use cached grammar flag will also be set to true.
Resets resetCachedGrammarPool
. Resets the documents vector pool and release all the associated memory back to the system.
When parsing a document using a DOM parser, all memory allocated for a DOM tree is associated to the DOM document.
If you do multiple parse using the same DOM parser instance, then multiple DOM documents will be generated and saved in a vector pool. All these documents (and thus all the allocated memory) won't be deleted until the parser instance is destroyed.
If you do not need these DOM documents anymore and do not want to destroy the DOM parser instance at this moment, then you can call this method to reset the document vector pool and release all the allocated memory back to the system. It is an error to call this method if you are in the middle of a parse (for example, a mid progressive parse).
Upon success, tpxmltofml ()
returns a 0. This function returns -1 on error and sets tperrno
to indicate the error condition.
The function may fail for the following reasons.
Either fml32bufp
or xmlbufp
is not a valid typed buffer, or parser has problems understanding the input.
A Tuxedo system error has occurred. The exact nature of the error is written to userlog(3c)
. This will also indicate when a conversion to FML was unable to be done. In that instance error detail info will be added to the userlog.
tpxmltofml32(3c)
, tpfml32toxml(3c)
, tpfmltoxml(3c)
![]() ![]() |
![]() |
![]() |