Functions
XML SAX

Functions

int mdlXMLSaxWriter_create (XmlSaxWriterRef *pSAXWriterRef)
 Creates an instance of a XML Sax Writer Class. More...
 
int mdlXMLSaxWriter_free (XmlSaxWriterRef saxWriterRef)
 Frees an instance of a XML SAX Writer Class. More...
 
int mdlXMLSaxWriter_beginDocument (XmlSaxWriterRef saxWriterRef, WChar const *pNodeName)
 Begins a document with the given tag name using the given XML SAX Writer. More...
 
int mdlXMLSaxWriter_endDocument (XmlSaxWriterRef saxWriterRef)
 Ends a document using the given XML SAX Writer. More...
 
int mdlXMLSaxWriter_beginElement (XmlSaxWriterRef saxWriterRef, WChar const *pTagName)
 Begins an element with the given tag name using the given XML SAX Writer. More...
 
int mdlXMLSaxWriter_endElement (XmlSaxWriterRef saxWriterRef, WChar const *pTagName)
 Ends an element with the given tag name using use given XML SAX Writer. More...
 
int mdlXMLSaxWriter_addEmptyElement (XmlSaxWriterRef saxWriterRef, WChar const *pTagName)
 Adds an empty element with the given tag name using the given XML SAX Writer. More...
 
int mdlXMLSaxWriter_addAttribute (XmlSaxWriterRef saxWriterRef, WChar const *pAttrName, WChar const *pAttrValue)
 Adds an attribute and its value. More...
 
int mdlXMLSaxWriter_addText (XmlSaxWriterRef saxWriterRef, WChar const *pText)
 Adds text to the XML SAX Writer. More...
 
int mdlXMLSaxReader_create (XmlSaxReaderRef *pSaxReaderRef)
 Creates an instance of an XML SAX Reader. More...
 
int mdlXMLSaxReader_free (XmlSaxReaderRef saxReaderRef)
 Frees an instance of an XML SAX Writer. More...
 
int mdlXMLSaxReader_parseFile (XmlSaxReaderRef saxReaderRef, WChar const *pFilename)
 Parses the given file using the XML Sax Reader. More...
 
int mdlXMLSaxReader_parseStream (XmlSaxReaderRef saxReaderRef, WChar const *pString)
 Parses the given stream using the XML Sax Reader. More...
 
int mdlXMLSaxReader_setFunction (XmlSaxReaderRef saxReaderRef, int functionType, void(*pFunction)())
 Sets a user function for use for the XML Sax Reader. More...
 
int mdlXMLSaxReader_setElementFilter (XmlSaxReaderRef saxReaderRef, WChar const *pElementName)
 Sets up an element filter for the given XML Sax Reader. More...
 
int mdlXMLSaxReader_clearElementFilter (XmlSaxReaderRef saxReaderRef)
 Clears the current element filter for the given XML SAX Reader. More...
 
WChar * mdlXMLSaxAttributes_getNameAtIndex (XmlSaxAttributes saxAttributes, int index)
 Returns a pointer to the Attribute value at the given index. More...
 
WChar * mdlXMLSaxAttributes_getValueFromName (XmlSaxAttributes saxAttributes, WChar const *pName)
 Returns a pointer to the Attribute value. More...
 
WChar * mdlXMLSaxAttributes_getValueAtIndex (XmlSaxAttributes saxAttributes, int index)
 Returns the attribute at the given index. More...
 
int mdlXMLSaxAttributes_freeSaxAttributes (XmlSaxAttributes saxAttributes)
 Fress an instance of XML Sax Attributes. More...
 

Detailed Description

Function Documentation

int mdlXMLSaxAttributes_freeSaxAttributes ( XmlSaxAttributes  saxAttributes)

Fress an instance of XML Sax Attributes.

Parameters
[in]saxAttributesReference to an XML SAX Attributes
Returns
SUCCESS or ERROR
See also
mdlXMLSaxAttributes_create
WChar* mdlXMLSaxAttributes_getNameAtIndex ( XmlSaxAttributes  saxAttributes,
int  index 
)

Returns a pointer to the Attribute value at the given index.

Parameters
[in]saxAttributesReference to an XML SAX Attributes
[in]indexIndex of the XML attribute name to be retrieved
Returns
SUCCESS or ERROR
WChar* mdlXMLSaxAttributes_getValueAtIndex ( XmlSaxAttributes  saxAttributes,
int  index 
)

Returns the attribute at the given index.

Parameters
[in]saxAttributesReference to an XML SAX Attributes
[in]indexIndex of the attribute to be retrieved
Returns
SUCCESS or ERROR
WChar* mdlXMLSaxAttributes_getValueFromName ( XmlSaxAttributes  saxAttributes,
WChar const *  pName 
)

Returns a pointer to the Attribute value.

Parameters
[in]saxAttributesReference to an XML SAX Attributes
[in]pNameName of XML Attribute to get
Returns
SUCCESS or ERROR
int mdlXMLSaxReader_clearElementFilter ( XmlSaxReaderRef  saxReaderRef)

Clears the current element filter for the given XML SAX Reader.

Parameters
[in]saxReaderRefReference to XML SAX Reader
Returns
SUCCESS or ERROR
Remarks
Set an element filter using mdlXMLSaxReader_setElementFilter
See also
mdlXMLSaxReader_setElementFilter
int mdlXMLSaxReader_create ( XmlSaxReaderRef pSaxReaderRef)

Creates an instance of an XML SAX Reader.

Parameters
[in]pSaxReaderRefReturned XML SAX Writer
Returns
SUCCESS or ERROR
Remarks
pSaxReaderRef must be freed using mdlXMLSaxReader_free
See also
pSaxReaderRef must be freed using mdlXMLSaxReader_free
int mdlXMLSaxReader_free ( XmlSaxReaderRef  saxReaderRef)

Frees an instance of an XML SAX Writer.

Parameters
[in]saxReaderRefReference to XML SAX Reader
Returns
SUCCESS or ERROR
int mdlXMLSaxReader_parseFile ( XmlSaxReaderRef  saxReaderRef,
WChar const *  pFilename 
)

Parses the given file using the XML Sax Reader.

Parameters
[in]saxReaderRefReference to XML SAX Reader
[in]pFilenameFilename to parse
Returns
SUCCESS or ERROR
int mdlXMLSaxReader_parseStream ( XmlSaxReaderRef  saxReaderRef,
WChar const *  pString 
)

Parses the given stream using the XML Sax Reader.

Parameters
[in]saxReaderRefReference to XML SAX Reader
[in]pStringXML String Stream to parse
Returns
SUCCESS or ERROR
int mdlXMLSaxReader_setElementFilter ( XmlSaxReaderRef  saxReaderRef,
WChar const *  pElementName 
)

Sets up an element filter for the given XML Sax Reader.

Parameters
[in]saxReaderRefReference to XML SAX Reader
[in]pElementNameElement name to set filter for
Returns
SUCCESS or ERROR
Remarks
Clear this element filter using mdlXMLSaxReader_clearElementFilter
See also
mdlXMLSaxReader_clearElementFilter
int mdlXMLSaxReader_setFunction ( XmlSaxReaderRef  saxReaderRef,
int  functionType,
void(*)()  pFunction 
)

Sets a user function for use for the XML Sax Reader.

Parameters
[in]saxReaderRefReference to XML SAX Reader
[in]functionTypeOne of SAX_TEXT_FUNC, SAX_STARTDOC_FUNC, SAX_ENDDOC_FUNC, SAX_STARTELE_FUNC, SAX_ENDELE_FUNC, SAX_PROCESSST_FUNC
[in]pFunctionPointer to function to set
Returns
SUCCESS or ERROR
Remarks
functionsType(s) are defined in mdlxmltools.h
int mdlXMLSaxWriter_addAttribute ( XmlSaxWriterRef  saxWriterRef,
WChar const *  pAttrName,
WChar const *  pAttrValue 
)

Adds an attribute and its value.

Parameters
[in]saxWriterRefReference to XML SAX Writer
[in]pAttrNameName of attribute to add
[in]pAttrValueValue of attribute to add
Returns
SUCCESS or ERROR
int mdlXMLSaxWriter_addEmptyElement ( XmlSaxWriterRef  saxWriterRef,
WChar const *  pTagName 
)

Adds an empty element with the given tag name using the given XML SAX Writer.

Parameters
[in]saxWriterRefReference to XML SAX Writer
[in]pTagNameTag name of element to begin
Returns
SUCCESS or ERROR
int mdlXMLSaxWriter_addText ( XmlSaxWriterRef  saxWriterRef,
WChar const *  pText 
)

Adds text to the XML SAX Writer.

Parameters
[in]saxWriterRefReference to XML SAX Writer
[in]pTextText to add
Returns
SUCCESS or ERROR
int mdlXMLSaxWriter_beginDocument ( XmlSaxWriterRef  saxWriterRef,
WChar const *  pNodeName 
)

Begins a document with the given tag name using the given XML SAX Writer.

Parameters
[in]saxWriterRefReference to XML SAX Writer
[in]pNodeNameTag name of document element to begin
Returns
SUCCESS or ERROR
Remarks
Used in conjunction with mdlXMLSaxWriter_endDocument
See also
mdlXMLSaxWriter_endDocument
int mdlXMLSaxWriter_beginElement ( XmlSaxWriterRef  saxWriterRef,
WChar const *  pTagName 
)

Begins an element with the given tag name using the given XML SAX Writer.

Parameters
[in]saxWriterRefReference to XML SAX Writer
[in]pTagNameTag name of element to begin
Returns
SUCCESS or ERROR
Remarks
Used in conjunction with mdlXMLSaxWriter_endElement
See also
mdlXMLSaxWriter_endElement
int mdlXMLSaxWriter_create ( XmlSaxWriterRef pSAXWriterRef)

Creates an instance of a XML Sax Writer Class.

Parameters
[out]pSAXWriterRefNewly created DOM
Remarks
pSAXWriterRef must be freed by calling mdlXMLSaxWriter_free
See also
mdlXMLSaxWriter_free
Returns
SUCCESS or ERROR
int mdlXMLSaxWriter_endDocument ( XmlSaxWriterRef  saxWriterRef)

Ends a document using the given XML SAX Writer.

Parameters
[in]saxWriterRefReference to XML SAX Writer
Returns
SUCCESS or ERROR
Remarks
Used in conjunction with mdlXMLSaxWriter_beginDocument
See also
mdlXMLSaxWriter_beginDocument
int mdlXMLSaxWriter_endElement ( XmlSaxWriterRef  saxWriterRef,
WChar const *  pTagName 
)

Ends an element with the given tag name using use given XML SAX Writer.

Parameters
[in]saxWriterRefReference to XML SAX Writer
[in]pTagNameTag name of element to begin
Returns
SUCCESS or ERROR
Remarks
Used in conjunction with mdlXMLSaxWriter_beginElement
See also
mdlXMLSaxWriter_beginElement
int mdlXMLSaxWriter_free ( XmlSaxWriterRef  saxWriterRef)

Frees an instance of a XML SAX Writer Class.

Parameters
[in]saxWriterRefXML SAX Writer class to free
Returns
SUCCESS or ERROR
See also
mdlXMLSaxWriter_create

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.