易截截图软件、单文件、免安装、纯绿色、仅160KB

高性能XML解析类

//pugxml.h
///////////////////////////////////////////////////////////////////////////////
//
// Pug XML Parser - Version 1.0002
// --------------------------------------------------------
// Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
// Released into the Public Domain. Use at your own risk.
// See pugxml.xml for further information, history, etc.
// Contributions by Neville Franks (readonly@getsoft.com).
//
///////////////////////////////////////////////////////////////////////////////
#if !defined(_PUGXML_)
#define _PUGXML_
#pragma once
//#define PUGOPT_MEMFIL //Uncomment to enable memory-mapped file parsing support.
//#define PUGOPT_NONSEG //Uncomment to enable non-destructive (non-segmenting) parsing support.
#ifdef PUGOPT_MEMFIL
# ifndef PUGOPT_NONSEG
#  define PUGOPT_NONSEG //PUGOPT_MEMFIL implies PUGOPT_NONSEG.
# endif
#endif
#include <iostream>
#include <ostream>
#include <string>
#if defined(PUGOPT_MEMFIL) | defined(PUGOPT_NONSEG)
# include <assert.h>
#endif
#ifndef HIWORD
# define HIWORD(X) ((unsigned short)((unsigned long)(X)>>16))
# define LOWORD(X) ((unsigned short)((unsigned long)(X)&0xFFFF))
#endif
//<summary>
// Library variant ID. The ID 0x58475550 is owned by Kristen Wegner. You *MUST*
// provide your own unique ID if you modify or fork the code in this library to
// your own purposes. If you change this then *you* are now the maintainer, not me.
// Change also in the package section of pugxml.xml, and append yourself to the
// authors section.
//</summary>
#define PUGAPI_INTERNAL_VARIANT 0x58475550
//<summary>Major version. Increment for each major release. Only change if you own the variant.</summary>
#define PUGAPI_INTERNAL_VERSION_MAJOR 1
//<summary>Minor version. Increment for each minor release. Only change if you own the variant ID.</summary>
#define PUGA


相关文档:

grails解析xml文件

xml文件:
<?xml version="1.0" encoding="iso-8859-1"?>
<Products>
    <product>
        <name>lovechoosesun</name>
        <buyNowURL>http://merch.danecook ......

将XML数据填充到TreeView中

文档及代码下载:http://www.dingos.cn/index.php?topic=1899.0
介绍

当菜单项是经常改变时,从XML文档中创建TreeView才当是非常有用的。例如,使用XML作为数据库存储记录。
这里有个简单示例。以防混淆这个例子比较简单。
背景
对XML、TreeView控件的应用,在Visual Studio中有助于理解这些步骤。
使用代码
注意 ......

VC解析XML 使用CMarkup类解析XML

VC解析XML--使用CMarkup类解析XML
(一) 先讲一下XML中的物殊字符,手动填写时注意一下。
字符                   字符实体
&              &nb ......

JS解析XML文件和字符串的跨浏览器实现


大多数浏览器都内建了供读取和操作 XML 的 XML 解析器。
解析器把 XML 转换为 JavaScript 可存取的对象。
但是IE和其它浏览器是有很大区别的
解析 XML 文件 - 跨浏览器实现
<html>
<body>
<mce:script type="text/javascript"><!--
try //针对IE和基于IE内核的浏览器
{
xmlD ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号