Xerces-C++ 编程指南

原文:http://xerces.apache.org/xerces-c/program.html    

想要使用的独立API ,DOM 、SAX或SAX2, 您的应用程序必须在使用API(由Xerces系统提供)之前初始化Xerces系统,并且在使用完毕后终止它。下面的代码就可以做到这点:

#include <xercesc/util/PlatformUtils.hpp>

// Other include files, declarations, and non-Xerces-C++ initializations.
XERCES_CPP_NAMESPACE_USE
 
int main(int argc, char* argv[])
{
  try
  {
    XMLPlatformUtils::Initialize();
  }
  catch (const XMLException& toCatch)
  {
    // Do your failure processing here
    return 1;
  }

  // Do your actual work with Xerces-C++ here.

  XMLPlatformUtils::Terminate();

  // Other terminations and cleanup.
  return 0;
}

XMLPlatformUtils::Initialize()和XMLPlatformUtils::Terminate()在每一个过程(process)中必须至少调用一次,当然您也可以多次调用他们,但是在每次调用时 XMLPlatformUtils::Initialize() 和 XMLPlatformUtils::Terminate()必须成对进行匹配。

  DOM编程指南
  DOM API是基于阿帕奇推荐的DOM的C++绑定(Apache Recommended DOM C++ binding)。 
  查阅DOM编程指南文档或者直接跳到如下目录: 

  • Design Objectives
  • DOM Level 3 Support in Xerces-C++
  • Using DOM API
    • Accessing API from application code
    • Class Names
    • Objects Management
    • Memory Management
    • String Type

    (本段译文)

  • XercesDOMParser
    • Constructing a XercesDOMParser
    • Supported Features
    • Supported Properties

    (本段译文)

  • DOMBuilder
    • Constructing a DOMBuilder
    • How to interchange DOMInputSource and SAX InputSource?
    • Supported Features
    • Supported Properties
  • DOMWriter
    • Constructing a DOMWriter
    • How does DOMWriter handle built-in entity Reference in node value?
    • Supported Features
  • Deprecated - Java-like DOM

      SAX编程指南 
      查阅SAX编程指南文档或者直接跳到如下目录: 

  • Using the SAX API
  • SAXParser
    • Constructing a SAXParser
    • Supported Features

      SAX2编程指南 
      请查阅SAX2编程指南文档或者直接跳到如下目录: 

  • Using the SAX2 API
  • SAX2XMLReader
    • Constructing an XML Reader
    • Supported Features
    • Supported Properties

      其他特性
      请查阅xerces C++ 编程指南文档或者直接跳到如下目录: 

  • Version Macros
  • Schema Support
  • Progressive Parsing
  • Preparsing Grammar and Grammar Caching
  • Loadable Message Text
  • Pluggable Transcoders
  • Porting Guidelines
  • Using C++ Namespace
  • Specify Locale for Message Loader
  • Specify Location for Message Loader
  • Use Specific Scanner
  • Pluggable Panic Handler
  • Pluggable Memory Manager
  • Managing Security Vulnerabilities
  • 你可能感兴趣的:(编程,C++,api,properties,features,deprecated)