home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _D3ACF7CE518E4796AF435FBEBABD8458 < prev    next >
Encoding:
Text File  |  2003-05-21  |  2.4 KB  |  87 lines

  1. ////////////////////////////////////////////////////////////////////////
  2. //
  3. // Doc.h
  4. //
  5. // This file was generated by XMLSPY 5 Enterprise Edition.
  6. //
  7. // YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
  8. // OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
  9. //
  10. // Refer to the XMLSPY Documentation for further details.
  11. // http://www.altova.com/xmlspy
  12. //
  13. ////////////////////////////////////////////////////////////////////////
  14.  
  15.  
  16. #ifndef ALTOVA_DOC_H_INCLUDED
  17. #define ALTOVA_DOC_H_INCLUDED
  18.  
  19. #if _MSC_VER > 1000
  20.     #pragma once
  21. #endif // _MSC_VER > 1000
  22.  
  23. namespace altova {
  24.  
  25.  
  26. class CNode;
  27.  
  28.  
  29. class ALTOVA_DECLSPECIFIER CDoc
  30. {
  31. public: // protected:
  32.     static xercesc::DOMImplementation* GetImplementationCore();
  33.     static xercesc::DOMImplementationLS* GetImplementationLS();
  34.     static xercesc::DOMBuilder* GetBuilder();
  35.     static xercesc::DOMWriter* GetWriter();
  36.     static xercesc::DOMDocument* GetDocument();
  37.     static xercesc::DOMNode* CreateFragment();
  38.     static void ReleaseFragment(xercesc::DOMNode* pDOMNode);
  39.  
  40. protected:
  41.     static xercesc::DOMImplementation*        sm_ImplementationCore;
  42.     static xercesc::DOMImplementationLS*    sm_ImplementationLS;
  43.     static xercesc::DOMBuilder*                sm_Builder;
  44.     static xercesc::DOMWriter*                sm_Writer;
  45.     static xercesc::DOMDocument*            sm_Document;
  46.     static xercesc::DOMDocumentFragment*    sm_Fragment;
  47.     static int                                sm_nTmpNameCounter;
  48.     static int                                sm_nFragmentCounter;
  49.     static int                                sm_nBuilderCounter;
  50.     static int                                sm_nWriterCounter;
  51.  
  52. public:
  53.     CDoc();
  54.     virtual ~CDoc();
  55.     xercesc::DOMDocument* Load(const tstring& sURI);
  56.     void Save(const tstring& sURI, CNode& rNode, bool bQualified = true);
  57.     void SetRootElementName(const tstring& sNamespaceURI, const tstring& sName);
  58.     void SetSchemaLocation(const tstring& sSchemaLocation);
  59.     void SetDTDLocation(const tstring& sSchemaLocation);
  60.     void RemoveSchemaLocation();
  61.  
  62. protected:
  63.     void FinalizeRootElement(CNode& rNode);
  64.     virtual void DeclareNamespaces(xercesc::DOMElement* pElement) = 0;
  65.     void DeclareNamespace(xercesc::DOMElement* pElement, const tstring& sPrefix, const tstring& sURI);
  66.  
  67. protected:
  68.     typedef enum
  69.     {
  70.         None,
  71.         DTD,
  72.         Schema
  73.     } ESchemaType;
  74.  
  75.     tstring        m_sRootElementName;
  76.     tstring        m_sRootElementNamespaceURI;
  77.     tstring        m_sSchemaLocation;
  78.     ESchemaType    m_eSchemaType;
  79.     bool        m_bBuilder;
  80.     bool        m_bWriter;
  81. };
  82.  
  83.  
  84. } // namespace altova
  85.  
  86. #endif // ALTOVA_DOC_H_INCLUDED
  87.