/******************************************************************/ /* Declaration of XML document processing using MS DOM */ /* Author: Olivier Bertrand 2007 - 2012 */ /******************************************************************/ #include"plgxml.h"
/******************************************************************/ /* XML block. Must have the same layout than FBLOCK up to Type. */ /******************************************************************/ typedefstruct _xblock { /* Loaded XML file block */ struct _xblock *Next;
LPCSTR Fname; /* Point on file name */
size_t Length; /* Used to tell if read mode */ short Count; /* Nb of times file is used */ short Type; /* TYPE_FB_XML */ int Retcode; /* Return code from Load */
MSXML2::IXMLDOMDocumentPtr Docp;/* Document interface pointer */
} XBLOCK, *PXBLOCK;
/******************************************************************/ /* Declaration of DOM document. */ /******************************************************************/ class DOMDOC : public XMLDOCUMENT { friendclass DOMNODE; public: // Constructor
DOMDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp);
// Properties virtualshort GetDocType(void) {return TYPE_FB_XML;} virtualvoid *GetDocPtr(void) {return Docp;} virtualvoid SetNofree(bool b) {} // Only libxml2
// Members
MSXML2::IXMLDOMDocumentPtr Docp;
MSXML2::IXMLDOMNodePtr Nodep; char Name[64];
WCHAR *Ws; int Len; bool Zip;
}; // end of class DOMNODE
/******************************************************************/ /* Declaration of DOM XML node list. */ /******************************************************************/ class DOMNODELIST : public XMLNODELIST { friendclass DOMDOC; friendclass DOMNODE; public: // Methods virtualint GetLength(void) {return Listp->length;} virtual PXNODE GetItem(PGLOBAL g, int n, PXNODE np); virtualbool DropItem(PGLOBAL g, int n);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.