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

Parser.cpp File Reference

More...

#include "Parser.h"

Go to the source code of this file.

Functions

void releaseDOM (DOM_H hdl)
 Release (destroy) the DOM_Node object obtained from parseDOM(). More...

DOM_H parseDOM (const unsigned char *pBuf, const unsigned long size)
 Returns the document node for a DOM obtained by parsing the supplied buffer. More...

XMLFormatter& operator<< (XMLFormatter &strm, const DOMString &s)
 Stuff a DOMString into the XMLFormatter. More...

void WalkXML (XMLFormatter *gFormatter, DOM_Node &toWrite)
 Copy the whole DOM to a CString. More...

void GetXML (unsigned char *&buf, unsigned long &siz, DOM_H toWrite, const char *encoding)
 Build XML from a DOM. More...

void addComment (DOM_Document &doc, DOM_Node &node, const char *rem)
 Insert a comment in the DOM document under the node. More...

void addTextI (DOM_Document &doc, DOM_Node &node, int num)
 Insert an integer value as text in the DOM document under the node. More...

void addTextU (DOM_Document &doc, DOM_Node &node, unsigned int num)
 Insert an unsigned value as text in the DOM document under the node. More...

void addTextD (DOM_Document &doc, DOM_Node &node, double num)
 Insert a floating point value as text in the DOM document under the node. More...

void addTextC (DOM_Document &doc, DOM_Node &node, XMLCh bt)
 Insert a single character as a text node in the DOM document under the node. More...

void addText (DOM_Document &doc, DOM_Node &node, const char *st)
 Insert a string as a text node in the DOM document under the node. More...

void addText (DOM_Document &doc, DOM_Node &node, unsigned short *st)
 Insert a wide string as a text node in the DOM document under the node. More...

DOM_Element addElement (DOM_Document &doc, DOM_Node &node, const char *st)
 Insert a new element in the DOM document under the node. More...

void createEmptySoap (DOM_Document &doc, DOM_Element &soapEnvelope, DOM_Element &soapBody)
 Create a 'standard' empty SOAP packet. More...

void addHeader (DOM_Document &doc, DOM_Element &envel, DOM_Element &soapHeader, const char *objRef, const char *ctxKey, const char *soapAction)
 Add a header to a SOAP packet. More...

void importHeader (DOM_Document &doc, DOM_Element &envel, DOM_Element &soapHeader)
 Import a header to a SOAP packet from another DOM document. More...

CString DOM2CS (DOMString &ds)
 Convert a DOMString to a CString. More...

CString DOM2CS (DOM_Element &el)
 Extract all TEXT_NODES from an ELEMENT_NODE and return them as a CString. More...


Variables

bool noInitXerces = true
 only initialize Xerces once. More...

const XMLCh gEndElement [] = { chOpenAngle, chForwardSlash, chNull }
 endElement. More...

const XMLCh gEndPI [] = { chQuestion, chCloseAngle, chNull}
 endPI. More...

const XMLCh gStartPI [] = { chOpenAngle, chQuestion, chNull }
 startPI. More...

const XMLCh gXMLDecl1 []
 XMLDecl1. More...

const XMLCh gXMLDecl2 []
 XMLDecl2. More...

const XMLCh gXMLDecl3 []
 XMLDecl3. More...

const XMLCh gXMLDecl4 []
 XMLDecl4. More...

const XMLCh gStartCDATA []
 StartCDATA. More...

const XMLCh gEndCDATA []
 EndCDATA. More...

const XMLCh gStartComment []
 StartComment. More...

const XMLCh gEndComment []
 EndComment. More...

const XMLCh gStartDoctype []
 StartDoctype. More...

const XMLCh gPublic []
 Public. More...

const XMLCh gSystem []
 System. More...

const XMLCh gStartEntity []
 StartEntity. More...

const XMLCh gNotation []
 Notation. More...


Detailed Description

Definition in file Parser.cpp.


Function Documentation

CString DOM2CS ( DOM_Element & el )
 

Extract all TEXT_NODES from an ELEMENT_NODE and return them as a CString.

Definition at line 671 of file Parser.cpp.

CString DOM2CS ( DOMString & ds )
 

Convert a DOMString to a CString.

Definition at line 662 of file Parser.cpp.

void GetXML ( unsigned char *& buf,
unsigned long & siz,
DOM_H toWrite,
const char * encoding = "UTF-8" )
 

Build XML from a DOM.

Iterates through the DOM and builds a buffer with the XML.

Parameters:
buf   The allocate buffer with the resulting XML.
siz   The size of the XML in the buffer.
toWrite   DOM to iterate.

Definition at line 461 of file Parser.cpp.

Referenced by SOAPBridge_SOAPCall_i::Fault(), AnyInterface::invoke(), and SOAPBridge_SOAPCall_i::invokeAction().

void WalkXML ( XMLFormatter * gFormatter,
DOM_Node & toWrite ) [static]
 

Copy the whole DOM to a CString.

Definition at line 212 of file Parser.cpp.

Referenced by GetXML().

void addComment ( DOM_Document & doc,
DOM_Node & node,
const char * rem )
 

Insert a comment in the DOM document under the node.

Parameters:
doc   The DOM.
node   The Node.
rem   The remark to insert.

Definition at line 480 of file Parser.cpp.

DOM_Element addElement ( DOM_Document & doc,
DOM_Node & node,
const char * st )
 

Insert a new element in the DOM document under the node.

Parameters:
doc   The DOM.
node   The Node.
st   The name of the element to create and insert.

Definition at line 580 of file Parser.cpp.

void addHeader ( DOM_Document & doc,
DOM_Element & envel,
DOM_Element & soapHeader,
const char * objRef = NULL,
const char * ctxKey = NULL,
const char * soapAction = NULL )
 

Add a header to a SOAP packet.

Parameters:
doc   The DOM document.
envel   Must be the SOAP envelope element.
header   The newly inserted SOAP header element.

Definition at line 625 of file Parser.cpp.

void addText ( DOM_Document & doc,
DOM_Node & node,
unsigned short * st )
 

Insert a wide string as a text node in the DOM document under the node.

Parameters:
doc   The DOM.
node   The Node.
st   The string to insert.
Todo:
must be tested

Definition at line 567 of file Parser.cpp.

void addText ( DOM_Document & doc,
DOM_Node & node,
const char * st )
 

Insert a string as a text node in the DOM document under the node.

Parameters:
doc   The DOM.
node   The Node.
st   The string to insert.

Definition at line 553 of file Parser.cpp.

void addTextC ( DOM_Document & doc,
DOM_Node & node,
XMLCh bt )
 

Insert a single character as a text node in the DOM document under the node.

Parameters:
doc   The DOM.
node   The Node.
bt   The character (can be wide) to insert.
Todo:
wide chars must be tested

Definition at line 539 of file Parser.cpp.

void addTextD ( DOM_Document & doc,
DOM_Node & node,
double num )
 

Insert a floating point value as text in the DOM document under the node.

Parameters:
doc   The DOM.
node   The Node.
num   The floating point number to insert.

Definition at line 523 of file Parser.cpp.

void addTextI ( DOM_Document & doc,
DOM_Node & node,
int num )
 

Insert an integer value as text in the DOM document under the node.

Parameters:
doc   The DOM.
node   The Node.
num   The integer number to insert.

Definition at line 493 of file Parser.cpp.

void addTextU ( DOM_Document & doc,
DOM_Node & node,
unsigned int num )
 

Insert an unsigned value as text in the DOM document under the node.

Parameters:
doc   The DOM.
node   The Node.
num   The unsigned number to insert.

Definition at line 508 of file Parser.cpp.

void createEmptySoap ( DOM_Document & doc,
DOM_Element & soapEnvelope,
DOM_Element & soapBody )
 

Create a 'standard' empty SOAP packet.

Parameters:
doc   Contains a new DOM document on return.
soapEnvelope   The root element of the SOAP packet.
soapBody   The body element of the SOAP packet.

Definition at line 608 of file Parser.cpp.

void importHeader ( DOM_Document & doc,
DOM_Element & envel,
DOM_Element & soapHeader )
 

Import a header to a SOAP packet from another DOM document.

Parameters:
doc   The DOM document.
envel   Must be the SOAP envelope element.
header   The SOAP header element to import.

Definition at line 653 of file Parser.cpp.

XMLFormatter & operator<< ( XMLFormatter & strm,
const DOMString & s )
 

Stuff a DOMString into the XMLFormatter.

Definition at line 196 of file Parser.cpp.

DOM_H parseDOM ( const unsigned char * pBuf,
const unsigned long size )
 

Returns the document node for a DOM obtained by parsing the supplied buffer.

Definition at line 36 of file Parser.cpp.

void releaseDOM ( DOM_H hdl )
 

Release (destroy) the DOM_Node object obtained from parseDOM().

Definition at line 30 of file Parser.cpp.

Referenced by DOM_Holder::~DOM_Holder().


Variable Documentation

const XMLCh gEndCDATA[] [static]
 

Initial value:

{
    chCloseSquare, chCloseSquare, chCloseAngle, chNull
}
EndCDATA.

Definition at line 150 of file Parser.cpp.

const XMLCh gEndComment[] [static]
 

Initial value:

{
    chDash, chDash, chCloseAngle, chNull
}
EndComment.

Definition at line 160 of file Parser.cpp.

const XMLCh gEndElement[] = { chOpenAngle, chForwardSlash, chNull } [static]
 

endElement.

Definition at line 111 of file Parser.cpp.

const XMLCh gEndPI[] = { chQuestion, chCloseAngle, chNull} [static]
 

endPI.

Definition at line 113 of file Parser.cpp.

const XMLCh gNotation[] [static]
 

Initial value:

{ 
    chLatin_N, chLatin_D, chLatin_A, chLatin_T, chLatin_A,
    chSpace, chDoubleQuote, chNull
}
Notation.

Definition at line 189 of file Parser.cpp.

const XMLCh gPublic[] [static]
 

Initial value:

{ 
    chLatin_P, chLatin_U, chLatin_B, chLatin_L, chLatin_I,
    chLatin_C, chSpace, chDoubleQuote, chNull
}
Public.

Definition at line 171 of file Parser.cpp.

const XMLCh gStartCDATA[] [static]
 

Initial value:

{ 
        chOpenAngle, chBang, chOpenSquare, chLatin_C, chLatin_D,
        chLatin_A, chLatin_T, chLatin_A, chOpenSquare, chNull
}
StartCDATA.

Definition at line 144 of file Parser.cpp.

const XMLCh gStartComment[] [static]
 

Initial value:

{ 
    chOpenAngle, chBang, chDash, chDash, chNull
}
StartComment.

Definition at line 155 of file Parser.cpp.

const XMLCh gStartDoctype[] [static]
 

Initial value:

{ 
    chOpenAngle, chBang, chLatin_D, chLatin_O, chLatin_C, chLatin_T,
    chLatin_Y, chLatin_P, chLatin_E, chSpace, chNull
}
StartDoctype.

Definition at line 165 of file Parser.cpp.

const XMLCh gStartEntity[] [static]
 

Initial value:

{ 
    chOpenAngle, chBang, chLatin_E, chLatin_N, chLatin_T, chLatin_I,
    chLatin_T, chLatin_Y, chSpace, chNull
}
StartEntity.

Definition at line 183 of file Parser.cpp.

const XMLCh gStartPI[] = { chOpenAngle, chQuestion, chNull } [static]
 

startPI.

Definition at line 115 of file Parser.cpp.

const XMLCh gSystem[] [static]
 

Initial value:

{ 
    chLatin_S, chLatin_Y, chLatin_S, chLatin_T, chLatin_E,
    chLatin_M, chSpace, chDoubleQuote, chNull
}
System.

Definition at line 177 of file Parser.cpp.

const XMLCh gXMLDecl1[] [static]
 

Initial value:

{
        chOpenAngle, chQuestion, chLatin_x, chLatin_m, chLatin_l
    ,   chSpace, chLatin_v, chLatin_e, chLatin_r, chLatin_s, chLatin_i
    ,   chLatin_o, chLatin_n, chEqual, chDoubleQuote, chNull
}
XMLDecl1.

Definition at line 117 of file Parser.cpp.

const XMLCh gXMLDecl2[] [static]
 

Initial value:

{
        chDoubleQuote, chSpace, chLatin_e, chLatin_n, chLatin_c
    ,   chLatin_o, chLatin_d, chLatin_i, chLatin_n, chLatin_g, chEqual
    ,   chDoubleQuote, chNull
}
XMLDecl2.

Definition at line 124 of file Parser.cpp.

const XMLCh gXMLDecl3[] [static]
 

Initial value:

{
        chDoubleQuote, chSpace, chLatin_s, chLatin_t, chLatin_a
    ,   chLatin_n, chLatin_d, chLatin_a, chLatin_l, chLatin_o
    ,   chLatin_n, chLatin_e, chEqual, chDoubleQuote, chNull
}
XMLDecl3.

Definition at line 131 of file Parser.cpp.

const XMLCh gXMLDecl4[] [static]
 

Initial value:

{
        chDoubleQuote, chQuestion, chCloseAngle
    ,   chCR, chLF, chNull
}
XMLDecl4.

Definition at line 138 of file Parser.cpp.

bool noInitXerces = true [static]
 

only initialize Xerces once.

Definition at line 27 of file Parser.cpp.


This documentation is part of the "SOAP to CORBA bridge" project
Copyright © 2000 by Lifeline Networks bv.
All rights are reserved.