30 #ifndef ONLY_LOCAL_PROXY
36 const char*
const CAXMLCostConfirmation::ms_pStrElemName=
"CC";
38 CAXMLCostConfirmation::CAXMLCostConfirmation()
46 CAXMLCostConfirmation* CAXMLCostConfirmation::getInstance(
UINT8 * strXmlData,
UINT32 strXmlDataLen)
51 CAXMLCostConfirmation* pCC=
new CAXMLCostConfirmation();
61 CAXMLCostConfirmation* CAXMLCostConfirmation::getInstance(DOMElement* elemRoot)
65 CAXMLCostConfirmation* pCC=
new CAXMLCostConfirmation();
67 pCC->m_domDocument->appendChild(pCC->m_domDocument->importNode(elemRoot,
true));
78 CAXMLCostConfirmation::~CAXMLCostConfirmation()
85 if (m_priceCerts != NULL)
87 for (
UINT32 i = 0; i < m_priceCertsLen; i++)
91 delete m_priceCerts[i];
92 m_priceCerts[i] = NULL;
95 delete[] m_priceCerts;
98 if(m_domDocument != NULL)
100 m_domDocument->release();
106 SINT32 CAXMLCostConfirmation::setValues()
108 if(m_domDocument==NULL)
110 DOMElement* elemRoot=m_domDocument->getDocumentElement();
111 if (elemRoot == NULL)
116 DOMElement* elem=NULL;
119 if( !
equals(elemRoot->getTagName(),ms_pStrElemName) )
137 UINT8 strGeneral[256];
138 UINT32 strGeneralLen = 256;
143 m_pStrPIID =
new UINT8[strGeneralLen+1];
144 memcpy(m_pStrPIID, strGeneral,strGeneralLen+1);
181 if (theNodes->getLength() <= 0)
187 m_priceCertsLen = theNodes->getLength();
188 m_priceCerts =
new CAPriceInfo*[m_priceCertsLen];
191 const DOMNode* curNode=NULL;
197 for (
UINT32 i = 0; i < m_priceCertsLen; i++ )
199 m_priceCerts[i] = NULL;
202 for (
UINT32 i = 0; i < m_priceCertsLen; i++ )
205 curNode = theNodes->item(i);
211 curId =
new UINT8[100];
222 curHash =
new UINT8[100];
240 m_priceCerts[i] =
new CAPriceInfo(curId, curHash, curPosition);
SINT32 getDOMElementValue(const DOMNode *const pElem, UINT8 *value, UINT32 *valuelen)
Returns the content of the text node(s) under elem as null-terminated C String.
bool equals(const XMLCh *const e1, const char *const e2)
XERCES_CPP_NAMESPACE::DOMDocument * parseDOMDocument(const UINT8 *const buff, UINT32 len)
Parses a buffer containing an XML document and returns this document.
DOMNodeList * getElementsByTagName(DOMElement *pElem, const char *const name)
XERCES_CPP_NAMESPACE::DOMDocument * createDOMDocument()
Parses a timestamp in JDBC timestamp escape format (as it comes from the BI) and outputs the value in...
SINT32 getDOMChildByName(const DOMNode *pNode, const char *const name, DOMElement *&child, bool deep)
SINT32 getDOMElementAttribute(const DOMNode *const elem, const char *attrName, UINT8 *value, UINT32 *len)