1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
<!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>XMLDump.hpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="examples.html">Examples</a> </center>
<hr><h1>XMLDump.hpp</h1><a href="XMLDump_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
00002 <font class="comment"> * (C) Copyright 2002, Schlund+Partner AG</font>
00003 <font class="comment"> *</font>
00004 <font class="comment"> * This library is free software; you can redistribute it and/or</font>
00005 <font class="comment"> * modify it under the terms of the GNU Lesser General Public</font>
00006 <font class="comment"> * License as published by the Free Software Foundation; either</font>
00007 <font class="comment"> * version 2.1 of the License, or (at your option) any later version.</font>
00008 <font class="comment"> *</font>
00009 <font class="comment"> * This library is distributed in the hope that it will be useful,</font>
00010 <font class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00011 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00012 <font class="comment"> * Lesser General Public License for more details.</font>
00013 <font class="comment"> *</font>
00014 <font class="comment"> * You should have received a copy of the GNU Lesser General Public</font>
00015 <font class="comment"> * License along with this library; if not, write to the Free Software</font>
00016 <font class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</font>
00017 <font class="comment">*/</font>
00018
00033 <font class="preprocessor">#ifndef SP_GXML_XMLDUMP_HPP</font>
00034 <font class="preprocessor"></font><font class="preprocessor">#define SP_GXML_XMLDUMP_HPP</font>
00035 <font class="preprocessor"></font>
00036 <font class="comment">// STDC++</font>
00037 <font class="preprocessor">#include <string></font>
00038
00039 <font class="comment">// C libraries</font>
00040 <font class="preprocessor">#include <libxslt/xsltInternals.h></font>
00041 <font class="preprocessor">#include <libxml/parser.h></font>
00042 <font class="preprocessor">#include <libxml/xpath.h></font>
00043 <font class="preprocessor">#include <libxml/tree.h></font>
00044 <font class="preprocessor">#include <libxslt/transform.h></font>
00045 <font class="preprocessor">#include <libxslt/xsltutils.h></font>
00046 <font class="preprocessor">#include <libxslt/imports.h></font>
00047
00048 <font class="comment">// Local</font>
00049 <font class="preprocessor">#include <<a class="code" href="Util_8hpp.html">sp-gxmlcpp/Util.hpp</a>></font>
00050 <font class="preprocessor">#include <<a class="code" href="XMLTree_8hpp.html">sp-gxmlcpp/XMLTree.hpp</a>></font>
00051
00052 <font class="keyword">namespace </font>SP
00053 {
00054 <font class="keyword">namespace </font>GXML
00055 {
00056
00057 <font class="comment">// toDo</font>
00058 <font class="keyword">class </font>XSLTOutputBuf
00059 {
00060 <font class="keyword">public</font>:
00061 <font class="keyword">enum</font> Exceptions
00062 {
00063 MEM_ERR, <font class="comment">// Mem Error</font>
00064 RESULT_INVALID, <font class="comment">// Result Doc invalid (0 or no children)</font>
00065 STYLE_INVALID <font class="comment">// Style invalid (0)</font>
00066 };
00067
00068 XSLTOutputBuf(xmlDocPtr result, xsltStylesheetPtr style);
00069 ~XSLTOutputBuf();
00070 <font class="keywordtype">char</font> * getAddr() <font class="keyword">const</font>;
00071 <font class="keywordtype">int</font> getSize() <font class="keyword">const</font>;
00072
00073 <font class="keyword">private</font>:
00074 xmlCharEncodingHandlerPtr encoder_;
00075 xmlOutputBufferPtr buf_;
00076 };
00077
00078 <font class="keyword">class </font>XMLDump
00079 {
00080 <font class="keyword">public</font>:
00081 <font class="keyword">enum</font> Exceptions
00082 {
00083 MEM_ERR, <font class="comment">// XML could not be parsed</font>
00084 NODE_NOT_FOUND_ERR <font class="comment">// Node could not be found from path</font>
00085 };
00086
00087 XMLDump(<font class="keyword">const</font> xmlDocPtr doc, <font class="keyword">const</font> xmlXPathContextPtr ctxt, <font class="keyword">const</font> std::string & path=<font class="stringliteral">"/"</font>);
00088 XMLDump(<font class="keyword">const</font> XMLTree * tree, <font class="keyword">const</font> std::string & path=<font class="stringliteral">"/"</font>);
00089 XMLDump(<font class="keyword">const</font> xmlDocPtr doc);
00090 <font class="comment">// toDo</font>
00091 XMLDump(<font class="keyword">const</font> XSLTOutputBuf * buf);
00092
00093 ~XMLDump();
00094
00095 <font class="keywordtype">char</font> * getAddr() <font class="keyword">const</font>;
00096 std::string get() <font class="keyword">const</font>;
00097 <font class="keywordtype">int</font> getSize() <font class="keyword">const</font>;
00098
00099 <font class="keyword">private</font>:
00100 xmlBufferPtr nodeDump_; <font class="comment">// This is used to dump XML from some path other than "/"</font>
00101 std::pair<xmlChar *, int> docDump_; <font class="comment">// This is used to dump the whole XML document (path = "/").</font>
00102 <font class="comment">// toDo</font>
00103 XSLTOutputBuf * xsltDump_; <font class="comment">// This is used when dumping was actually done outside. Currently only for XSL Transformations.</font>
00104
00105 <font class="comment">// genDump: Master Create Dump Function. Must be used in Constructors only</font>
00106 <font class="keywordtype">void</font> genDump(<font class="keyword">const</font> xmlDocPtr doc, <font class="keyword">const</font> xmlXPathContextPtr ctxt, <font class="keyword">const</font> std::string & path);
00107
00108 <font class="keyword">static</font> <font class="keywordtype">char</font> * nullString_;
00109 };
00110
00111 }}
00112 <font class="preprocessor">#endif</font>
</pre></div><hr><address align="right"><small>Generated on Thu Jun 3 19:20:12 2004 for sp-gxmlcpp by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>
|