📄 pxml_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>pxml.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>pxml.h</h1><a href="pxml_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * pxml.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * XML parser support</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Portable Windows Library</span>00007 <span class="comment"> *</span>00008 <span class="comment"> * Copyright (c) 2002 Equivalence Pty. Ltd.</span>00009 <span class="comment"> *</span>00010 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00011 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00012 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00013 <span class="comment"> * http://www.mozilla.org/MPL/</span>00014 <span class="comment"> *</span>00015 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00016 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00017 <span class="comment"> * the License for the specific language governing rights and limitations</span>00018 <span class="comment"> * under the License.</span>00019 <span class="comment"> *</span>00020 <span class="comment"> * The Original Code is Portable Windows Library.</span>00021 <span class="comment"> *</span>00022 <span class="comment"> * The Initial Developer of the Original Code is Equivalence Pty. Ltd.</span>00023 <span class="comment"> *</span>00024 <span class="comment"> * Contributor(s): ______________________________________.</span>00025 <span class="comment"> *</span>00026 <span class="comment"> * $Log: pxml.h,v $</span>00027 <span class="comment"> * Revision 1.23 2004/04/21 00:35:02 csoutheren</span>00028 <span class="comment"> * Added a stream parser for protocols like XMPP where each child of the root is to be considered a separate document/message.</span>00029 <span class="comment"> * Thanks to Federico Pinna and Reitek S.p.A.</span>00030 <span class="comment"> *</span>00031 <span class="comment"> * Revision 1.22 2003/04/27 23:54:13 craigs</span>00032 <span class="comment"> * Removed deprecated options</span>00033 <span class="comment"> *</span>00034 <span class="comment"> * Revision 1.21 2003/03/31 07:41:50 craigs</span>00035 <span class="comment"> * Fixed problem with accidental introduced dependency on expat.h</span>00036 <span class="comment"> *</span>00037 <span class="comment"> * Revision 1.20 2003/03/31 06:21:19 craigs</span>00038 <span class="comment"> * Split the expat wrapper from the XML file handling to allow reuse of the parser</span>00039 <span class="comment"> *</span>00040 <span class="comment"> * Revision 1.19 2003/01/13 02:14:02 robertj</span>00041 <span class="comment"> * Improved error logging for auto-loaded XML</span>00042 <span class="comment"> *</span>00043 <span class="comment"> * Revision 1.18 2002/12/16 06:38:24 robertj</span>00044 <span class="comment"> * Added ability to specify certain elemets (by name) that are exempt from</span>00045 <span class="comment"> * the indent formatting. Useful for XML/RPC where leading white space is</span>00046 <span class="comment"> * not ignored by all servers.</span>00047 <span class="comment"> *</span>00048 <span class="comment"> * Revision 1.17 2002/11/26 05:53:57 craigs</span>00049 <span class="comment"> * Added ability to auto-reload from URL</span>00050 <span class="comment"> *</span>00051 <span class="comment"> * Revision 1.16 2002/11/21 08:09:04 craigs</span>00052 <span class="comment"> * Changed to not overwrite XML data if load fails</span>00053 <span class="comment"> *</span>00054 <span class="comment"> * Revision 1.15 2002/11/19 07:37:38 craigs</span>00055 <span class="comment"> * Added locking functions and LoadURL function</span>00056 <span class="comment"> *</span>00057 <span class="comment"> * Revision 1.14 2002/11/06 22:47:24 robertj</span>00058 <span class="comment"> * Fixed header comment (copyright etc)</span>00059 <span class="comment"> *</span>00060 <span class="comment"> */</span>00061 00062 <span class="preprocessor">#ifndef _PXML_H</span>00063 <span class="preprocessor"></span><span class="preprocessor">#define _PXML_H</span>00064 <span class="preprocessor"></span>00065 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00066 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00067 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00068 <span class="preprocessor"></span>00069 <span class="preprocessor">#include <ptlib.h></span>00070 <span class="preprocessor">#include <<a class="code" href="http_8h.html">ptclib/http.h</a>></span>00071 00073 00074 <span class="keyword">class </span><a class="code" href="classPXMLElement.html">PXMLElement</a>;00075 <span class="keyword">class </span><a class="code" href="classPXMLData.html">PXMLData</a>;00076 <a name="l00077"></a><a class="code" href="classPXMLParser.html">00077</a> <span class="keyword">class </span><a class="code" href="classPXMLParser.html">PXMLParser</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00078 {00079 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPXMLParser.html">PXMLParser</a>, <a class="code" href="classPObject.html">PObject</a>);00080 <span class="keyword">public</span>:<a name="l00081"></a><a class="code" href="classPXMLParser.html#s5">00081</a> <span class="keyword">enum</span> <a class="code" href="classPXMLParser.html#s5">Options</a> {00082 <a class="code" href="classPXMLParser.html#s5s0">Indent</a> = 1,00083 <a class="code" href="classPXMLParser.html#s5s1">NewLineAfterElement</a> = 2,00084 <a class="code" href="classPXMLParser.html#s5s2">NoIgnoreWhiteSpace</a> = 4, <span class="comment">// ignored</span>00085 <a class="code" href="classPXMLParser.html#s5s3">CloseExtended</a> = 8, <span class="comment">// ignored</span>00086 <a class="code" href="classPXMLParser.html#s5s4">WithNS</a> = 16,00087 };00088 00089 <a class="code" href="classPXMLParser.html#a0">PXMLParser</a>(<span class="keywordtype">int</span> <a class="code" href="classPXMLParser.html#n0">options</a> = -1);00090 <a class="code" href="classPXMLParser.html#a1">~PXMLParser</a>();00091 BOOL <a class="code" href="classPXMLParser.html#a2">Parse</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * data, <span class="keywordtype">int</span> dataLen, BOOL <span class="keyword">final</span>);00092 <span class="keywordtype">void</span> <a class="code" href="classPXMLParser.html#a3">GetErrorInfo</a>(<a class="code" href="classPString.html">PString</a> & errorString, PINDEX & errorCol, PINDEX & errorLine);00093 00094 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPXMLParser.html#a4">StartElement</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keyword">const</span> <span class="keywordtype">char</span> **attrs);00095 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPXMLParser.html#a5">EndElement</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * name);00096 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPXMLParser.html#a6">AddCharacterData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * data, <span class="keywordtype">int</span> len);00097 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPXMLParser.html#a7">XmlDecl</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classPXMLParser.html#n5">version</a>, <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classPXMLParser.html#n6">encoding</a>, <span class="keywordtype">int</span> <a class="code" href="classPXMLParser.html#n7">standAlone</a>);00098 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPXMLParser.html#a8">StartDocTypeDecl</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * docTypeName,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -