Commit d1ea88b1 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

sax reader & dom model test

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@57647 954022d7-b5bf-4e40-9824-e11837661b57
parent 4820371e
...@@ -318,6 +318,7 @@ Common/ASCDocxFormat/Lib/Release/DocxFormat.lib svn_mime_002dtype=application%2F ...@@ -318,6 +318,7 @@ Common/ASCDocxFormat/Lib/Release/DocxFormat.lib svn_mime_002dtype=application%2F
Common/ASCDocxFormat/Lib/Release/Utility.lib svn_mime_002dtype=application%2Foctet-stream Common/ASCDocxFormat/Lib/Release/Utility.lib svn_mime_002dtype=application%2Foctet-stream
Common/ASCDocxFormat/Lib/Release/XML.lib svn_mime_002dtype=application%2Foctet-stream Common/ASCDocxFormat/Lib/Release/XML.lib svn_mime_002dtype=application%2Foctet-stream
Common/DocxFormat/Source/SystemUtility/Solution/FileSystemTest/app.ico svn_mime_002dtype=application%2Foctet-stream Common/DocxFormat/Source/SystemUtility/Solution/FileSystemTest/app.ico svn_mime_002dtype=application%2Foctet-stream
Common/DocxFormat/Source/XML/libxml2/LIBXML2_LIB_TEST svnc_tsvn_003alogminsize=5
Common/DocxFormat/Source/XML/libxml2/XML/doc/DOM.gif svn_mime_002dtype=application%2Foctet-stream Common/DocxFormat/Source/XML/libxml2/XML/doc/DOM.gif svn_mime_002dtype=application%2Foctet-stream
Common/DocxFormat/Source/XML/libxml2/XML/doc/Libxml2-Logo-180x168.gif svn_mime_002dtype=application%2Foctet-stream Common/DocxFormat/Source/XML/libxml2/XML/doc/Libxml2-Logo-180x168.gif svn_mime_002dtype=application%2Foctet-stream
Common/DocxFormat/Source/XML/libxml2/XML/doc/Libxml2-Logo-90x34.gif svn_mime_002dtype=application%2Foctet-stream Common/DocxFormat/Source/XML/libxml2/XML/doc/Libxml2-Logo-90x34.gif svn_mime_002dtype=application%2Foctet-stream
......
========================================================================
. libxml2_test
========================================================================
libxml2_test
.
,
libxml2_test.
libxml2_test.vcproj
VC++,
.
Visual C++,
, ,
, .
libxml2_test.cpp
.
/////////////////////////////////////////////////////////////////////////////
:
StdAfx.h, StdAfx.cpp
(PCH) libxml2_test.pch
StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
:
TODO:
, .
/////////////////////////////////////////////////////////////////////////////
// libxml2_test.cpp: .
//
#include "stdafx.h"
#include "../libxml2.h"
int _tmain(int argc, _TCHAR* argv[])
{
//std::wstring sFileInput = L"C:\\Users\\Oleg\\Desktop\\book1\\word\\document.xml";
std::wstring sFileInput = L"D:\\123\\word\\document.xml";
#if 0
XmlUtils::CXmlLiteReader oReader;
oReader.FromFile(sFileInput);
oReader.ReadNextNode();
std::wstring strXml = oReader.GetOuterXml();
#endif
#if 1
XmlUtils::CXmlNode oNode;
bool bRes = oNode.FromXmlFile(sFileInput);
XmlUtils::CXmlNode oNodeBody = oNode.GetNode(L"w:body");
XmlUtils::CXmlNodes oNodesPar = oNodeBody.GetNodes(L"w:p");
XmlUtils::CXmlNode oNodePar1;
if (oNodesPar.GetAt(1, oNodePar1))
{
XmlUtils::CXmlNode oNode1 = oNodePar1.GetNode(L"w:pPr");
XmlUtils::CXmlNode oNode2 = oNode1.GetNode(L"w:spacing");
std::wstring sAttribute = oNode2.GetAttribute(L"w:after");
XmlUtils::CXmlNode oNode3 = oNodePar1.GetNode(L"w:r");
XmlUtils::CXmlNode oNode4 = oNode3.GetNode(L"w:t");
std::wstring sText = oNode4.GetText();
int y = 0;
++y;
}
//std::wstring sResultXmlDOM = oNode.private_GetXml();
std::wstring sResultXmlDOM = oNode.private_GetXmlFast();
#endif
return 0;
}

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2_test", "libxml2_test.vcproj", "{FAD19DFC-E88A-4969-8C7D-0EEB59558CDD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FAD19DFC-E88A-4969-8C7D-0EEB59558CDD}.Debug|Win32.ActiveCfg = Debug|Win32
{FAD19DFC-E88A-4969-8C7D-0EEB59558CDD}.Debug|Win32.Build.0 = Debug|Win32
{FAD19DFC-E88A-4969-8C7D-0EEB59558CDD}.Release|Win32.ActiveCfg = Release|Win32
{FAD19DFC-E88A-4969-8C7D-0EEB59558CDD}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="libxml2_test"
ProjectGUID="{FAD19DFC-E88A-4969-8C7D-0EEB59558CDD}"
RootNamespace="libxml2_test"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
UseOfATL="1"
CharacterSet="1"
ManagedExtensions="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../XML/include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comsuppw.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="../win_build/Debug"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../XML/include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comsuppw.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="../win_build/Release"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name=" "
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\libxml2.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\libxml2_test.cpp"
>
</File>
<File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name=" "
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\stdafx.h"
>
</File>
<File
RelativePath=".\targetver.h"
>
</File>
</Filter>
<Filter
Name=" "
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<File
RelativePath=".\ReadMe.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
// stdafx.cpp: ,
// libxml2_test.pch
// stdafx.obj
#include "stdafx.h"
// TODO. STDAFX.H
// ,
// stdafx.h:
// , ,
//
//
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
// TODO. ,
#pragma once
// .
// - Windows, Internet Explorer . .,
// . ,
// .
// , , .
// . MSDN.
#ifndef _WIN32_WINNT // , Windows Vista.
#define _WIN32_WINNT 0x0600 // , Windows.
#endif
#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#define _CRT_SECURE_NO_DEPRECATE
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
// turns off ATL's hiding of some common and often safely ignored warning messages
#define _ATL_ALL_WARNINGS
#include <windows.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <atltypes.h>
#include <atlctl.h>
#include <atlhost.h>
#include <atlcoll.h>
#include <comutil.h>
using namespace ATL;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment