transfer from internal tree r5311 branches/1.4-gpl
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@177 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
34
docs/developer/XMLPush/ReadMe.txt
Normal file
34
docs/developer/XMLPush/ReadMe.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
========================================================================
|
||||
CONSOLE APPLICATION : XMLPush
|
||||
========================================================================
|
||||
|
||||
|
||||
AppWizard has created this XMLPush application for you.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your XMLPush application.
|
||||
|
||||
XMLPush.dsp
|
||||
This file (the project file) contains information at the project level and
|
||||
is used to build a single project or subproject. Other users can share the
|
||||
project (.dsp) file, but they should export the makefiles locally.
|
||||
|
||||
XMLPush.cpp
|
||||
This is the main application source file.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other standard files:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
These files are used to build a precompiled header (PCH) file
|
||||
named XMLPush.pch and a precompiled types file named StdAfx.obj.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other notes:
|
||||
|
||||
AppWizard uses "TODO:" to indicate parts of the source code you
|
||||
should add to or customize.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
8
docs/developer/XMLPush/StdAfx.cpp
Normal file
8
docs/developer/XMLPush/StdAfx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// XMLPush.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
22
docs/developer/XMLPush/StdAfx.h
Normal file
22
docs/developer/XMLPush/StdAfx.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__323F1140_CFC1_11D4_A457_0004AC96D4C3__INCLUDED_)
|
||||
#define AFX_STDAFX_H__323F1140_CFC1_11D4_A457_0004AC96D4C3__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__323F1140_CFC1_11D4_A457_0004AC96D4C3__INCLUDED_)
|
||||
|
||||
#include "libxml/parser.h"
|
||||
#include "libxml/tree.h"
|
||||
8
docs/developer/XMLPush/XMLDump.xml
Normal file
8
docs/developer/XMLPush/XMLDump.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<q3map_feedback>
|
||||
<message level="1">Q3Map - built for GtkRadiant v1.1b - based on v1.0q (c) 1999 Id Software Inc.
|
||||
</message>
|
||||
<message level="3">************ ERROR ************
|
||||
usage: q3map [general options] [options] mapfile
|
||||
</message>
|
||||
</q3map_feedback>
|
||||
30
docs/developer/XMLPush/XMLPush.cpp
Normal file
30
docs/developer/XMLPush/XMLPush.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// XMLPush.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FILE *f;
|
||||
xmlDocPtr doc;
|
||||
|
||||
f = fopen("XMLDump.xml", "r");
|
||||
if (f != NULL) {
|
||||
int res, size = 1024;
|
||||
char chars[1024];
|
||||
xmlParserCtxtPtr ctxt;
|
||||
|
||||
res = fread(chars, 1, 4, f);
|
||||
if (res > 0) {
|
||||
ctxt = xmlCreatePushParserCtxt(NULL, NULL,
|
||||
chars, res, "foooo (filename)?");
|
||||
while ((res = fread(chars, 1, size, f)) > 0) {
|
||||
xmlParseChunk(ctxt, chars, res, 0);
|
||||
}
|
||||
xmlParseChunk(ctxt, chars, 0, 1);
|
||||
doc = ctxt->myDoc;
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user