Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

cpl_minixml.h

00001 /**********************************************************************
00002  * $Id: cpl_minixml_h-source.html,v 1.2 2002/04/16 13:11:47 warmerda Exp $
00003  *
00004  * Project:  CPL - Common Portability Library
00005  * Purpose:  Declarations for MiniXML Handler.
00006  * Author:   Frank Warmerdam, warmerdam@pobox.com
00007  *
00008  **********************************************************************
00009  * Copyright (c) 2001, Frank Warmerdam
00010  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  * 
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  * 
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00022  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
00027  * DEALINGS IN THE SOFTWARE.
00028  **********************************************************************
00029  *
00030  * $Log: cpl_minixml_h-source.html,v $
00030  * Revision 1.2  2002/04/16 13:11:47  warmerda
00030  * updated
00030  *
00031  * Revision 1.4  2002/03/05 14:26:57  warmerda
00032  * expanded tabs
00033  *
00034  * Revision 1.3  2002/01/23 20:45:06  warmerda
00035  * handle <?...?> and comment elements
00036  *
00037  * Revision 1.2  2001/12/06 18:13:49  warmerda
00038  * added CPLAddXMLChild and CPLCreateElmentAndValue
00039  *
00040  * Revision 1.1  2001/11/16 15:39:48  warmerda
00041  * New
00042  *
00043  **********************************************************************/
00044 
00045 #ifndef _CPL_MINIXML_H_INCLUDED
00046 #define _CPL_MINIXML_H_INCLUDED
00047 
00048 #include "cpl_port.h"
00049 
00050 CPL_C_START
00051 
00052 typedef enum 
00053 {
00054     CXT_Element = 0,
00055     CXT_Text = 1,
00056     CXT_Attribute = 2,
00057     CXT_Comment = 3
00058 } CPLXMLNodeType;
00059 
00060 typedef struct _CPLXMLNode
00061 {
00062     CPLXMLNodeType      eType;
00063     
00064     char                *pszValue;
00065 
00066     struct _CPLXMLNode  *psNext;
00067     struct _CPLXMLNode  *psChild;
00068 } CPLXMLNode;
00069 
00070 
00071 CPLXMLNode CPL_DLL *CPLParseXMLString( const char * );
00072 void       CPL_DLL  CPLDestroyXMLNode( CPLXMLNode * );
00073 CPLXMLNode CPL_DLL *CPLGetXMLNode( CPLXMLNode *poRoot, 
00074                                    const char *pszPath );
00075 const char CPL_DLL *CPLGetXMLValue( CPLXMLNode *poRoot, 
00076                                     const char *pszPath, 
00077                                     const char *pszDefault );
00078 CPLXMLNode CPL_DLL *CPLCreateXMLNode( CPLXMLNode *poParent, 
00079                                       CPLXMLNodeType eType,
00080                                       const char *pszText );
00081 char       CPL_DLL *CPLSerializeXMLTree( CPLXMLNode *psNode );
00082 void       CPL_DLL  CPLAddXMLChild( CPLXMLNode *psParent,
00083                                     CPLXMLNode *psChild );
00084 CPLXMLNode CPL_DLL *CPLCreateXMLElementAndValue( CPLXMLNode *psParent,
00085                                                  const char *pszName,
00086                                                  const char *pszValue );
00087 
00088 CPL_C_END
00089 
00090 #endif /* _CPL_MINIXML_H_INCLUDED */

Generated at Thu Mar 28 09:47:28 2002 for GDAL by doxygen1.2.3-20001105 written by Dimitri van Heesch, © 1997-2000