资源简介
尝试了许多c++ xml类,个人认为这是最容易入手的c++ xml类,可以跨平台用的。本人现在使用的就是这个。

代码片段和文件信息
/*
http://code.google.com/p/ticpp/
Copyright (c) 2006 Ryan Pusztai Ryan Mulder
Permission is hereby granted free of charge to any person obtaining a copy of
this software and associated documentation files (the “Software“) to deal in
the Software without restriction including without limitation the rights to
use copy modify merge publish distribute sublicense and/or sell copies of
the Software and to permit persons to whom the Software is furnished to do so
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER LIABILITY WHETHER
IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef TIxml_USE_TICPP
#include “ticpp.h“
#include “ticpprc.h“
#include “tinyxml.h“
#include
using namespace ticpp;
// In the following Visitor functions casting away const should be safe as the object can only be referred to by a const &
bool Visitor::VisitEnter( const TixmlDocument& doc )
{
return VisitEnter( Document( const_cast< TixmlDocument* >( &doc ) ) );
}
bool Visitor::VisitExit( const TixmlDocument& doc )
{
return VisitEnter( Document( const_cast< TixmlDocument* >( &doc ) ) );
}
bool Visitor::VisitEnter( const TixmlElement& element const TixmlAttribute* firstAttribute )
{
if ( 0 != firstAttribute )
{
Attribute attribute( const_cast< TixmlAttribute* >( firstAttribute ) );
return VisitEnter( Element( const_cast< TixmlElement* >( &element ) ) &attribute );
}
else
{
return VisitEnter( Element( const_cast< TixmlElement* >( &element ) ) 0 );
}
}
bool Visitor::VisitExit( const TixmlElement& element )
{
return VisitExit( Element( const_cast< TixmlElement* >( &element ) ) );
}
bool Visitor::Visit( const TixmlDeclaration& declaration )
{
return Visit( Declaration( const_cast< TixmlDeclaration* >( &declaration ) ) );
}
bool Visitor::Visit( const TixmlstylesheetReference& stylesheet )
{
return Visit( stylesheetReference( const_cast< TixmlstylesheetReference* >( &stylesheet ) ) );
}
bool Visitor::Visit( const TixmlText& text )
{
return Visit( Text( const_cast< TixmlText* >( &text ) ) );
}
bool Visitor::Visit( const TixmlComment& comment )
{
return Visit( Comment( const_cast< TixmlComment* >( &comment ) ) );
}
Attribute::Attribute()
{
SetTixmlPointer( new TixmlAttribute() );
m_impRC->InitRef();
}
Attribute::Attribute( TixmlAttribute* attribute )
{
SetTixmlPointer( attribute );
m_impRC->IncRef();
}
Attribute::Attribute( cons
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1764 2009-05-22 11:26 ticpp\.svn\all-wcprops
文件 62 2009-05-22 11:26 ticpp\.svn\dir-prop-ba
文件 3244 2009-05-22 11:26 ticpp\.svn\entries
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
文件 34 2009-05-22 11:26 ticpp\.svn\prop-ba
目录 0 2009-05-22 11:26 ticpp\.svn\prop-ba
目录 0 2009-05-22 11:26 ticpp\.svn\props
文件 2673 2009-05-22 11:26 ticpp\.svn\text-ba
文件 13546 2009-05-22 11:26 ticpp\.svn\text-ba
文件 50635 2009-05-22 11:26 ticpp\.svn\text-ba
文件 1707 2009-05-22 11:26 ticpp\.svn\text-ba
文件 1823 2009-05-22 11:26 ticpp\.svn\text-ba
文件 19869 2009-05-22 11:26 ticpp\.svn\text-ba
文件 25145 2009-05-22 11:26 ticpp\.svn\text-ba
文件 49829 2009-05-22 11:26 ticpp\.svn\text-ba
文件 4536 2009-05-22 11:26 ticpp\.svn\text-ba
............此处省略61个文件信息
- 上一篇:MFC画直线及简单图形
- 下一篇:MFC做的计算三角形面积
相关资源
- 利用C++类实现PNG图像读写及显示
- C#C++混合编程C#调用非托管C++类
-
c++读取xm
l配置文件 -
用c++实现的简单xm
l解析 -
c++实现解析xm
l - netcdf 4.4.1 c/c++类库windows64位绿色版
-
msxm
l的使用 vc6 - json字符串转换c++类对象
- CWnd类VC++类所有函数的中文翻译
- Student.zip166256
- 《数据机构与算法》三级项目 - 开发
-
C++xm
l高级编程指南扫描版 - c++类库管理系统分析与设计
-
c++ xm
l处理 domsax - C++用类读取和处理TXT文件数据
- NTFS数据恢复的c++类代码
- 基于LSB的图片数据隐藏c++类
-
可以快速批量生成HTML/xm
l/WORD文档 - 自己写的MFC串口调试软件
-
c++实现的简单xm
l解析器 -
C语言编写的xm
l库源文件(支持xm< - c++类型长度查看方式
- 精确计算24节气的c++类
- OpenGl文字显示c++类
-
xm
l解析 CMarkup类 c++ - matlab2016b配置VS2017编译器mexopts补丁文
-
MFC、DOM实现的xm
l文件解析、修改和 -
VC 读写xm
l文件运用 - c++类声明和成员函数分离写法
-
纯C语言解析xm
l字符串
评论
共有 条评论