p6domxml.h

Go to the documentation of this file.
00001 
00013 #ifndef P6DOMXML_H__
00014 #define P6DOMXML_H__ 1
00015 
00016 #include "p6err.h"
00017 #include "p6datastream.h"
00018 #include "p6domxmltypes.h"
00019 #include "p6domnodeset.h"
00020 #include "p6sax2xmlreader.h"
00021 #include "p6jsonreader.h"
00022 
00023 namespace P6R { 
00024 
00025 #ifdef  __cplusplus
00026 extern "C" {
00027 #endif
00028 
00046 typedef struct 
00047 {
00048    P6R::P6XPATH_TYPE   type;        // which type is used?
00049    const P6R::P6WCHAR* pString;     //  
00050    P6R::P6UINT32       strLength;   // length of the string pString
00051    P6R::P6BOOL         bResult;       
00052    P6R::P6INT32        iResult;       
00053    P6R::P6FLOAT        fResult;       
00054    P6R::p6IXpathTime*  ptResult;      
00055    P6R::P6INT64        lResult;       
00056    P6R::p6IDOMNodeset* pNodeSet;    
00057 } P6XPATH_RESULT;
00058 
00059 
00067 typedef P6UINT32 P6DOMOUTPUT;
00068 const P6DOMOUTPUT P6DOMOUTPUT_XML         = 0x00000001;     
00069 const P6DOMOUTPUT P6DOMOUTPUT_JSON        = 0x00000002;     
00070 const P6DOMOUTPUT P6DOMOUTPUT_CHARSETUTF8 = 0x00000003;     
00071 
00072 
00073 
00082 interface p6IDOMXML : public p6ICom
00083 {
00099    P6COMMETHOD initialize( P6DOMXMLFLAGS flags, p6IDataStream* pErrorResult  ) = 0;
00100 
00121    P6COMMETHOD setSAXParser( p6ISAX2XMLReader* pReader ) = 0;
00122 
00139    P6COMMETHOD setJSONParser( p6IJSONReader* pReader ) = 0;
00140 
00156     P6COMMETHOD parse( p6IDataStream** pInData ) = 0;
00157 
00172    P6COMMETHOD getRootNode( p6IXMLNode** pNode ) = 0;
00173 
00193    P6COMMETHOD moveSubTree( p6IXMLNode* pParent, p6IXMLNode* pMoveNode ) = 0;
00194 
00208    P6COMMETHOD createNodeSet( p6IXMLNode*     pNode, 
00209                         p6IDOMNodeset** pSet  
00210                        ) = 0;
00211 
00231    P6COMMETHOD isParentOf( const P6WCHAR* pName,  
00232                      P6UINT32       nameLength, 
00233                             const P6WCHAR* pURI,
00234                             P6UINT32       uriLength,
00235                      p6IXMLNode*    pNode, 
00236                      p6IXMLNode**   pFoundAncestor 
00237                     ) = 0;
00238 
00263    P6COMMETHOD isAncestorOf( const P6WCHAR* pName,  
00264                        P6UINT32       nameLength, 
00265                               const P6WCHAR* pURI,
00266                               P6UINT32       uriLength,
00267                        p6IXMLNode*    pNode, 
00268                        p6IXMLNode**   pFoundAncestor 
00269                      ) = 0;
00270 
00291    P6COMMETHOD stripSpace( P6WCHAR* pElementName, 
00292                      P6UINT32 elemLength,
00293                      P6WCHAR* pNamespaceURI,
00294                      P6UINT32 uriLength
00295                     ) = 0;
00296 
00319    P6COMMETHOD preserveSpace( P6WCHAR* pElementName, 
00320                         P6UINT32 elemLength,
00321                         P6WCHAR* pNamespaceURI,
00322                         P6UINT32 uriLength
00323                       ) = 0;
00324 
00335    P6COMMETHOD resetStripSpace() = 0;
00336 
00345    P6COMMETHOD resetPreserveSpace() = 0;
00346 
00360     P6COMMETHOD output( p6IDataStream* pStream, P6DOMOUTPUT flags ) = 0; 
00361 };
00362 
00363 // {774F828D-44CE-4e62-86BB-71F939605AFE}
00364 #define IF_p6IDOMXML  {0x774f828d,0x44ce,0x4e62,{0x86,0xbb,0x71,0xf9,0x39,0x60,0x5a,0xfe}}
00365 
00366 // {15BBA122-8B01-404b-BC4D-2E7E129437A6}
00367 #define COMP_p6DOMXML {0x15bba122,0x8b01,0x404b,{0xbc,0x4d,0x2e,0x7e,0x12,0x94,0x37,0xa6}}
00368 
00369 #ifdef  __cplusplus
00370 }
00371 #endif
00372 
00373 } // namespace
00374 
00375 
00376 #endif
00377 
00378 
00379 
00380 
00381 
00382 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Copyright © 2004 - 2010 P6R Inc. - All Rights Reserved.