XMLParserItf Interface CATIXMLPPWriter
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIXMLPPWriter
Interface to efficiently generate XML content.
The interface guarantees that the generated XML is well-formed.
It can keep track of namespaces. It supports pretty-printing.
Method Index
- o
WriteAttribute(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
- Adds an attribute to the currently open element.
- o
WriteCData(CATUnicodeString&)
- Writes a CDATA section.
- o
WriteCharacterEntity(unsigned int)
- Writes a character entity.
- o
WriteCharacters(CATUnicodeString&)
- Writes XML text.
- o
WriteComment(CATUnicodeString&)
- Writes a comment.
- o
WriteDocumentType(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
- Writes the document type declaration of the XML file.
- o
WriteEndDocument()
- Closes any open elements and flushes the output.
- o
WriteEndElement()
- Closes one element and pops its namespace out of scope.
- o
WriteEntityReference(CATUnicodeString&)
- Writes an entity reference.
- o
WriteProcessingInstruction(CATUnicodeString&,CATUnicodeString&)
- Writes a processing instruction.
- o
WriteRawXml(CATUnicodeString&)
- Writes raw XML under the control of the caller.
- o
WriteStartDocument(CATBoolean,CATBoolean)
- Writes the XML declaration.
- o
WriteStartElement(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
- Opens an element and pushes its namespace on the stack.
Methods
o WriteAttribute
public virtual WriteAttribute( | const | iLocalName, |
| const | iValue, |
| const | iURI | = "", |
| const | iPrefix | = "") |
-
Adds an attribute to the currently open element.
- Parameters:
-
- iLocalName
- The attribute local name
- iValue
- The attribute value
- iURI
- The URI of the attribute's namespace
- iPrefix
- The namespace prefix for this attribute
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteCData
public virtual WriteCData( | const | iCharacters) |
-
Writes a CDATA section.
- Parameters:
-
- iCharacters
- The contents of the CDATA section
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteCharacterEntity
public virtual WriteCharacterEntity( | | iValue) |
-
Writes a character entity.
- Parameters:
-
- iValue
- The character value
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteCharacters
public virtual WriteCharacters( | const | iCharacters) |
-
Writes XML text.
- Parameters:
-
- iCharacters
- The XML text to write
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteComment
public virtual WriteComment( | const | iComment) |
-
Writes a comment.
- Parameters:
-
- iComment
- the comment text
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteDocumentType
public virtual WriteDocumentType( | const | iName, |
| const | iPublicId, |
| const | iSystemId, |
| const | iInternalSubset) |
-
Writes the document type declaration of the XML file.
- Parameters:
-
- iName
- The name of the root element
- iPublicId
- If non empty, the external ID of the document type declaration will be of the form:
PUBLIC iPublicId iSystemId
- iSystemId
- If non empty and iPublicId is empty, the external ID of the document type declaration will be of the form:
SYSTEM iSystemId
- iInternalSubset
- The internal subset of the document type declaration
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteEndDocument
public virtual WriteEndDocument( | ) |
-
Closes any open elements and flushes the output.
Errors Returned:
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteEndElement
public virtual WriteEndElement( | ) |
-
Closes one element and pops its namespace out of scope.
Errors Returned:
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteEntityReference
public virtual WriteEntityReference( | const | iEntityName) |
-
Writes an entity reference.
- Parameters:
-
- iEntityName
- The name of the entity
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteProcessingInstruction
public virtual WriteProcessingInstruction( | const | iTarget, |
| const | iData) |
-
Writes a processing instruction.
- Parameters:
-
- iTarget
- The processing instruction target
- iData
- The processing instruction data
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteRawXml
public virtual WriteRawXml( | const | iXml) |
-
Writes raw XML under the control of the caller.
This method bypasses well-formedness tests and should be only in
exceptional circumstances when the equivalent result cannot be
obtained through other API calls.
- Parameters:
-
- iXml
- the raw XML to write
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteStartDocument
public virtual WriteStartDocument( | | iStandalone | = FALSE, |
| | iSkipDeclaration | = FALSE) |
-
Writes the XML declaration.
- Parameters:
-
- iStandalone
- TRUE if the XML document is standalone, FALSE otherwise
- iSkipDeclaration
- TRUE if the XML declaration should not be written, FALSE otherwise
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
o WriteStartElement
public virtual WriteStartElement( | const | iLocalName, |
| const | iURI | = "", |
| const | iPrefix | = "") |
-
Opens an element and pushes its namespace on the stack.
- Parameters:
-
- iLocalName
- The element local name
- iURI
- The URI of the element's namespace
- iPrefix
- The namespace prefix for this element
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2400 |
I/O error |
| XMLParserERR_2401 |
Illegal state. The requested action cannot be performed
or would result in a not-well-formed XML document |
This object is included in the file: CATIXMLPPWriter.h
If needed, your Imakefile.mk should include the module: CatXmlItfBase
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.