文件名称:将XSD转成XML,便于读取
文件大小:41KB
文件格式:ZIP
更新时间:2013-12-07 05:02:30
XSD XML
从XSD专程XML,非常实用。class CSaxContentHandler : public ISAXContentHandler { public: CSaxContentHandler(); virtual ~CSaxContentHandler(); virtual long __stdcall QueryInterface(const struct _GUID &, void **); virtual unsigned long __stdcall AddRef(void); virtual unsigned long __stdcall Release(void); virtual HRESULT STDMETHODCALLTYPE putDocumentLocator( /* [in] */ ISAXLocator __RPC_FAR *pLocator); virtual HRESULT STDMETHODCALLTYPE startDocument(void); virtual HRESULT STDMETHODCALLTYPE endDocument(void); virtual HRESULT STDMETHODCALLTYPE startPrefixMapping( /* [in] */ wchar_t __RPC_FAR *pwchPrefix, /* [in] */ int cchPrefix, /* [in] */ wchar_t __RPC_FAR *pwchUri, /* [in] */ int cchUri); virtual HRESULT STDMETHODCALLTYPE endPrefixMapping( /* [in] */ wchar_t __RPC_FAR *pwchPrefix, /* [in] */ int cchPrefix); virtual HRESULT STDMETHODCALLTYPE startElement( /* [in] */ wchar_t __RPC_FAR *pwchNamespaceUri, /* [in] */ int cchNamespaceUri, /* [in] */ wchar_t __RPC_FAR *pwchLocalName, /* [in] */ int cchLocalName, /* [in] */ wchar_t __RPC_FAR *pwchRawName, /* [in] */ int cchRawName, /* [in] */ ISAXAttributes __RPC_FAR *pAttributes); virtual HRESULT STDMETHODCALLTYPE endElement( /* [in] */ wchar_t __RPC_FAR *pwchNamespaceUri, /* [in] */ int cchNamespaceUri, /* [in] */ wchar_t __RPC_FAR *pwchLocalName, /* [in] */ int cchLocalName, /* [in] */ wchar_t __RPC_FAR *pwchRawName, /* [in] */ int cchRawName); virtual HRESULT STDMETHODCALLTYPE characters( /* [in] */ wchar_t __RPC_FAR *pwchChars, /* [in] */ int cchChars); virtual HRESULT STDMETHODCALLTYPE ignorableWhitespace( /* [in] */ wchar_t __RPC_FAR *pwchChars, /* [in] */ int cchChars); virtual HRESULT STDMETHODCALLTYPE processingInstruction( /* [in] */ wchar_t __RPC_FAR *pwchTarget, /* [in] */ int cchTarget, /* [in] */ wchar_t __RPC_FAR *pwchData, /* [in] */ int cchData); virtual HRESULT STDMETHODCALLTYPE skippedEntity( /* [in] */ wchar_t __RPC_FAR *pwchName, /* [in] */ int cchName); // Attach/detach XML events handler. void AttachElementHandler(IXmlElementHandler* pElementHandler); void AttachElementHandler(IWXmlElementHandler* pWElementHandler); void DetachElementHandler(); private: int m_depth; IXmlElementHandler* m_attachElementHandler; IWXmlElementHandler* m_attachWElementHandler; };
【文件预览】:
TestXml
----TestConsole()
--------StdAfx.cpp(298B)
--------ReadMe.txt(1KB)
--------StdAfx.h(769B)
--------TestConsole.cpp(2KB)
--------TestConsole.dsp(5KB)
----TestXml.dsw(1KB)
----XmlSupport()
--------SaxContentHandler.cpp(9KB)
--------StdAfx.cpp(208B)
--------XmlParser.cpp(12KB)
--------XmlElementHandler.h(2KB)
--------SaxErrorHandler.h(2KB)
--------XmlDataTypes.h(5KB)
--------XmlSupport.dsp(4KB)
--------XmlDataTypes.cpp(6KB)
--------XmlParser.h(3KB)
--------Readme.txt(883B)
--------StdAfx.h(747B)
--------SaxErrorHandler.cpp(4KB)
--------SaxContentHandler.h(3KB)
----TestXmlSupport()
--------books.xml(4KB)
--------StdAfx.cpp(216B)
--------resource.h(1KB)
--------TestXmlSupport.dsp(5KB)
--------TestXmlSupportDlg.cpp(11KB)
--------XmlTester.h(2KB)
--------test.xml(324B)
--------BookCatalog.h(3KB)
--------ReadMe.txt(4KB)
--------StdAfx.h(1KB)
--------TestXmlSupport.h(1KB)
--------books2.xsd(946B)
--------books.xsd(864B)
--------res()
--------XmlTester.cpp(8KB)
--------books2.xml(885B)
--------TestXmlSupportDlg.h(2KB)
--------TestXmlSupport.cpp(2KB)
--------BookCatalog.cpp(7KB)
--------TestXmlSupport.rc(7KB)