Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

XMLSerializer Class Reference

Serializes XML SOAP Envelop fragments to form a SOAP Message. More...

#include <XMLSerializer.hpp>

List of all members.

Public Methods

 XMLSerializer (XmlWriter &str)
 ~XMLSerializer ()
void RegisterPrefixForURI (const std::string &prefix, const std::string &uri)
 Register a Prefix for a namespace URI. More...

std::string GetPrefixForURI (const std::string &uri)
 Get a prefix for a given namespace URI. More...

std::string GetPrefixForURI (const std::string &uri, std::string defaultPrefix)
 Get a prefix for the given namespace URI. More...

std::string QNameToStr (ax::QName &qName)
 Convert Qualified Name to a string as: prefix:local-name. More...

void SetTypeMappingRegistry (TypeMappingRegistry *p_TypMapper)
 Sets a reference to the TypeMapping Registry. More...

TypeMappingRegistryGetTypeMapper ()
 Obtain a reference to the TypeMappingRegistry we're using. More...

void StartElem (ax::QName &p_qName, AttList &p_attList)
 Start building DOM sub-tree rooted at element having tag name with the given QName. More...

void EndElem ()
 End this branch of the DOM tree. More...

void WriteStr (const std::string &str)
 Write TEXT- node. More...

DOM_Element& Append (ax::QName &p_qName, AttList &p_attList)
 Append a subtree to the current node. More...

void Serialize (ax::QName p_qName, AttList &p_attList, const char *value)
 Serialize a SOAP body element by appending a branch to the current node. More...

void flush ()
 Write the content of the DOM document into a stream. More...


Private Attributes

NsStack m_nsStk
 Namespace stack for namespace mapping for the current context. More...

bool m_bStartDoc
 Starting to build a DOM document from SOAP Message components. More...

int m_nIndent
 To make pertty. More...

int m_PrefixIndx
 To make pretty. More...

XmlWriterm_xmlBuffer
 output stream to dump serilized DOM document. More...

TypeMappingRegistrym_pTypeMapper
DOM_Document m_Doc
DOM_Node m_CurNode
DOM_Element m_CurElm
DOM_Element m_ChildElm
DOM_Text m_CurTxtElm

Friends

std::ostream& operator<< (std::ostream &target, const DOMString &toWrite)
std::ostream& operator<< (std::ostream &target, DOM_Node &toWrite)
XMLFormatter& operator<< (XMLFormatter &strm, const DOMString &s)


Detailed Description

Serializes XML SOAP Envelop fragments to form a SOAP Message.

Manage a serialization, including keeping track of namespace mappings and element stacks.

Definition at line 93 of file XMLSerializer.hpp.


Constructor & Destructor Documentation

XMLSerializer::XMLSerializer ( XmlWriter & str )
 

Definition at line 86 of file XMLSerializer.cpp.

XMLSerializer::~XMLSerializer ( )
 

Definition at line 104 of file XMLSerializer.cpp.


Member Function Documentation

DOM_Element & XMLSerializer::Append ( ax::QName & p_qName,
AttList & p_attList )
 

Append a subtree to the current node.

Definition at line 128 of file XMLSerializer.cpp.

Referenced by Serialize(), and StartElem().

void XMLSerializer::EndElem ( )
 

End this branch of the DOM tree.

Definition at line 165 of file XMLSerializer.cpp.

Referenced by SOAPHeader::Serialize(), SOAPFaultElement::Serialize(), SOAPBodyElement::Serialize(), and RPCElement::Serialize().

std::string XMLSerializer::GetPrefixForURI ( const std::string & uri,
std::string defaultPrefix )
 

Get a prefix for the given namespace URI.

Definition at line 189 of file XMLSerializer.cpp.

std::string XMLSerializer::GetPrefixForURI ( const std::string & uri )
 

Get a prefix for a given namespace URI.

Definition at line 182 of file XMLSerializer.cpp.

Referenced by QNameToStr(), and RPCParam::Serialize().

TypeMappingRegistry * XMLSerializer::GetTypeMapper ( ) [inline]
 

Obtain a reference to the TypeMappingRegistry we're using.

Definition at line 115 of file XMLSerializer.hpp.

Referenced by RPCParam::Serialize().

std::string XMLSerializer::QNameToStr ( ax::QName & qName )
 

Convert Qualified Name to a string as: prefix:local-name.

Definition at line 211 of file XMLSerializer.cpp.

Referenced by Append().

void XMLSerializer::RegisterPrefixForURI ( const std::string & prefix,
const std::string & uri )
 

Register a Prefix for a namespace URI.

Definition at line 177 of file XMLSerializer.cpp.

Referenced by GetPrefixForURI().

void XMLSerializer::Serialize ( ax::QName p_qName,
AttList & p_attList,
const char * value )
 

Serialize a SOAP body element by appending a branch to the current node.

Definition at line 171 of file XMLSerializer.cpp.

Referenced by RPCParam::Serialize().

void XMLSerializer::SetTypeMappingRegistry ( TypeMappingRegistry * p_TypMapper ) [inline]
 

Sets a reference to the TypeMapping Registry.

Definition at line 112 of file XMLSerializer.hpp.

Referenced by SOAPMessage::Serialize().

void XMLSerializer::StartElem ( ax::QName & p_qName,
AttList & p_attList )
 

Start building DOM sub-tree rooted at element having tag name with the given QName.

Definition at line 110 of file XMLSerializer.cpp.

Referenced by SOAPHeader::Serialize(), SOAPFaultElement::Serialize(), SOAPEnvelope::Serialize(), SOAPBodyElement::Serialize(), and RPCElement::Serialize().

void XMLSerializer::WriteStr ( const std::string & str )
 

Write TEXT- node.

Definition at line 159 of file XMLSerializer.cpp.

Referenced by Serialize().

void XMLSerializer::flush ( )
 

Write the content of the DOM document into a stream.

Definition at line 218 of file XMLSerializer.cpp.

Referenced by SOAPEnvelope::Serialize().


Friends And Related Function Documentation

XMLFormatter & operator<< ( XMLFormatter & strm,
const DOMString & s ) [friend]
 

Definition at line 429 of file XMLSerializer.cpp.

std::ostream & operator<< ( std::ostream & target,
DOM_Node & toWrite ) [friend]
 

Definition at line 261 of file XMLSerializer.cpp.

std::ostream & operator<< ( std::ostream & target,
const DOMString & toWrite ) [friend]
 

Definition at line 420 of file XMLSerializer.cpp.


Member Data Documentation

DOM_Element XMLSerializer::m_ChildElm [private]
 

Definition at line 157 of file XMLSerializer.hpp.

DOM_Element XMLSerializer::m_CurElm [private]
 

Definition at line 156 of file XMLSerializer.hpp.

DOM_Node XMLSerializer::m_CurNode [private]
 

Definition at line 155 of file XMLSerializer.hpp.

DOM_Text XMLSerializer::m_CurTxtElm [private]
 

Definition at line 158 of file XMLSerializer.hpp.

DOM_Document XMLSerializer::m_Doc [private]
 

Definition at line 154 of file XMLSerializer.hpp.

int XMLSerializer::m_PrefixIndx [private]
 

To make pretty.

Definition at line 147 of file XMLSerializer.hpp.

bool XMLSerializer::m_bStartDoc [private]
 

Starting to build a DOM document from SOAP Message components.

Definition at line 145 of file XMLSerializer.hpp.

int XMLSerializer::m_nIndent [private]
 

To make pertty.

Definition at line 146 of file XMLSerializer.hpp.

NsStack XMLSerializer::m_nsStk [private]
 

Namespace stack for namespace mapping for the current context.

Definition at line 143 of file XMLSerializer.hpp.

TypeMappingRegistry * XMLSerializer::m_pTypeMapper [private]
 

Definition at line 151 of file XMLSerializer.hpp.

XmlWriter * XMLSerializer::m_xmlBuffer [private]
 

output stream to dump serilized DOM document.

Definition at line 149 of file XMLSerializer.hpp.


The documentation for this class was generated from the following files: Axis C++ Client Lib - User's Guide

Copyright © 2001 SL_OpenSource XML Project. All Rights Reserved