From: Carl Forsman on 16 Nov 2008 09:15 On Sun, 16 Nov 2008 07:55:49 -0500, Tommy <bad(a)reallybad.com> wrote: >Carl Forsman wrote: >> I use the pugXML parser >> >> http://www.codeproject.com/KB/cpp/pugxml.aspx >> >> How can I dump the "IN memory" DOM tree into XML file? >> >> I cannot found a function that can do that. > >You can using the built-in branch Root serialize streamer > > CPugXmlBranch cRoot = pXml->GetRoot(); > cout << cRoot << endl << endl; my pugxml.h seem don't have the Class CPugXmlBranch I got error when using your code http://www.oniva.com/upload/1356/xml3.jpg http://www.oniva.com/upload/1356/pugxml.h > >or you can write your own traveral class based on the CPugXMLFilter >class. See the sample.cpp "Example A" > > ////////////////////////////////////////// > // Example A - Parse a file from disk. > ////////////////////////////////////////// > > pXml->ParseFile(filename, PARSE_XXXX options); > > //Output the resulting tree using our outline filter. > > CMyXmlOutline cFilter; > pXml->GetRoot().Traverse(cFilter);
From: Carl Forsman on 16 Nov 2008 09:17 On Sun, 16 Nov 2008 07:55:49 -0500, Tommy <bad(a)reallybad.com> wrote: >Carl Forsman wrote: >> I use the pugXML parser >> >> http://www.codeproject.com/KB/cpp/pugxml.aspx >> >> How can I dump the "IN memory" DOM tree into XML file? >> >> I cannot found a function that can do that. > >You can using the built-in branch Root serialize streamer > > CPugXmlBranch cRoot = pXml->GetRoot(); > cout << cRoot << endl << endl; I got this error when using this code http://www.oniva.com/upload/1356/xml4.jpg > >or you can write your own traveral class based on the CPugXMLFilter >class. See the sample.cpp "Example A" > > ////////////////////////////////////////// > // Example A - Parse a file from disk. > ////////////////////////////////////////// > > pXml->ParseFile(filename, PARSE_XXXX options); > > //Output the resulting tree using our outline filter. > > CMyXmlOutline cFilter; > pXml->GetRoot().Traverse(cFilter);
From: Tommy on 16 Nov 2008 09:52 Carl Forsman wrote: > On Sun, 16 Nov 2008 07:55:49 -0500, Tommy <bad(a)reallybad.com> wrote: > >> Carl Forsman wrote: >>> I use the pugXML parser >>> >>> http://www.codeproject.com/KB/cpp/pugxml.aspx >>> >>> How can I dump the "IN memory" DOM tree into XML file? >>> >>> I cannot found a function that can do that. >> You can using the built-in branch Root serialize streamer >> >> CPugXmlBranch cRoot = pXml->GetRoot(); >> cout << cRoot << endl << endl; > > my pugxml.h seem don't have the Class CPugXmlBranch You have an old version then. I have a 2003 version (attached) and we use it for a lite weight WINAPI version WCXML.DLL helper/wrapper library for our embedded p-code system which 3rd party developers can use in their scripts. The version I have came with an excellent PUGXML.CHM help file with a sample.cpp example geared toward VC6 developers. I had downloaded it from codeproject.com (Search for PUGXML). The files extracted were: 01/11/2003 08:20 PM 245,628 pugxml.chm 01/11/2003 12:00 PM 4,597 pugxml.dsp 01/11/2003 11:59 AM 94,869 pugxml.h 01/11/2003 11:41 AM 5,610 pugxml.vcproj 01/13/2003 04:34 AM 108,235 pugxml_demo.zip 01/13/2003 04:34 AM 231,421 pugxml_manual.zip 01/13/2003 04:34 AM 19,545 pugxml_src.zip 04/30/2006 10:01 AM <DIR> Release 01/11/2003 11:44 AM 6,516 sample.cpp 01/07/2003 12:02 AM 298 stdafx.cpp 01/06/2003 11:52 PM 184 stdafx.h Now, there were a bugs we found in pugxml.h which I fixed (attached copy is the fixed version). Do a diff to see the difference once you get the official copy. I see in my folders I have an even newer version. 02/09/2003 04:41 PM 151,155 pugxml.chm 01/11/2003 12:00 PM 4,597 pugxml.dsp 02/09/2003 03:25 PM 147,658 pugxml.h 02/09/2003 03:16 PM 164,476 pugxml.hxs 02/01/2003 03:24 PM 5,610 pugxml.vcproj 02/05/2003 04:53 PM 19,345 pugxml.xml 04/30/2006 09:50 AM 43,994 pugxml_demo.zip 04/30/2006 09:50 AM 261,260 pugxml_manual.zip 04/30/2006 09:49 AM 29,567 pugxml_src.zip 02/09/2003 03:24 PM 10,049 sample.cpp 01/25/2003 07:08 PM 3,280 source-package.css 01/21/2003 02:24 PM 6,739 source-package.xsd 01/25/2003 07:09 PM 7,278 source-package.xsl 01/07/2003 12:02 AM 298 stdafx.cpp 01/06/2003 11:52 PM 184 stdafx.h But as you can see, its probably no longer a lite version :-) --
From: Tommy on 16 Nov 2008 09:54 Carl Forsman wrote: > On Sun, 16 Nov 2008 07:55:49 -0500, Tommy <bad(a)reallybad.com> wrote: > >> You can using the built-in branch Root serialize streamer >> >> CPugXmlBranch cRoot = pXml->GetRoot(); >> cout << cRoot << endl << endl; > > I got this error when using this code > http://www.oniva.com/upload/1356/xml4.jpg I was trying to scroll the windows and display the output window to see the errors but it seems like it was locked :-) --
From: Tommy on 16 Nov 2008 10:11 Tommy wrote: > Carl Forsman wrote: >> my pugxml.h seem don't have the Class CPugXmlBranch > > You have an old version then. > > I have a 2003 version (attached) and we use it for a lite weight WINAPI > version WCXML.DLL helper/wrapper library for our embedded p-code system > which 3rd party developers can use in their scripts. > > The version I have came with an excellent PUGXML.CHM help file with a > sample.cpp example geared toward VC6 developers. I had downloaded it > from codeproject.com (Search for PUGXML). The files extracted were: > > 01/11/2003 08:20 PM 245,628 pugxml.chm > 01/11/2003 12:00 PM 4,597 pugxml.dsp > 01/11/2003 11:59 AM 94,869 pugxml.h > 01/11/2003 11:41 AM 5,610 pugxml.vcproj > 01/13/2003 04:34 AM 108,235 pugxml_demo.zip > 01/13/2003 04:34 AM 231,421 pugxml_manual.zip > 01/13/2003 04:34 AM 19,545 pugxml_src.zip > 04/30/2006 10:01 AM <DIR> Release > 01/11/2003 11:44 AM 6,516 sample.cpp > 01/07/2003 12:02 AM 298 stdafx.cpp > 01/06/2003 11:52 PM 184 stdafx.h > > Now, there were a bugs we found in pugxml.h which I fixed (attached copy > is the fixed version). Do a diff to see the difference once you get the > official copy. Sorry, I attached the above version wanting to give you the official version before I noticed my working copy had changes. Attach is the pugxml.diff with the few changes. One of them is needed to compile under VC8+. --
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: PostMessage fails with error code 183 Next: CMFCOutlookBar class |