Annotation of gpl/axl/src/axl_doc.h, revision 1.1
1.1 ! misho 1: /*
! 2: * LibAxl: Another XML library
! 3: * Copyright (C) 2006 Advanced Software Production Line, S.L.
! 4: *
! 5: * This program is free software; you can redistribute it and/or
! 6: * modify it under the terms of the GNU Lesser General Public License
! 7: * as published by the Free Software Foundation; either version 2.1 of
! 8: * the License, or (at your option) any later version.
! 9: *
! 10: * This program is distributed in the hope that it will be useful,
! 11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
! 12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! 13: * GNU Lesser General Public License for more details.
! 14: *
! 15: * You should have received a copy of the GNU Lesser General Public
! 16: * License along with this program; if not, write to the Free
! 17: * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
! 18: * 02111-1307 USA
! 19: *
! 20: * You may find a copy of the license under this software is released
! 21: * at COPYING file. This is LGPL software: you are welcome to
! 22: * develop proprietary applications using this library without any
! 23: * royalty or fee but returning back any change, improvement or
! 24: * addition in the form of source code, project image, documentation
! 25: * patches, etc.
! 26: *
! 27: * For commercial support on build XML enabled solutions contact us:
! 28: *
! 29: * Postal address:
! 30: * Advanced Software Production Line, S.L.
! 31: * Edificio Alius A, Oficina 102,
! 32: * C/ Antonio Suarez Nº 10,
! 33: * Alcalá de Henares 28802 Madrid
! 34: * Spain
! 35: *
! 36: * Email address:
! 37: * info@aspl.es - http://www.aspl.es/xml
! 38: */
! 39: #ifndef __AXL_DOC_H__
! 40: #define __AXL_DOC_H__
! 41:
! 42: #include <axl_decl.h>
! 43:
! 44: BEGIN_C_DECLS
! 45:
! 46: /**
! 47: * \addtogroup axl_doc_module
! 48: * @{
! 49: */
! 50:
! 51: axlDoc * axl_doc_create (const char * version,
! 52: const char * encoding,
! 53: axl_bool standalone);
! 54:
! 55: axlDoc * axl_doc_parse (const char * entity,
! 56: int entity_size,
! 57: axlError ** error);
! 58:
! 59: axlDoc * axl_doc_parse_strings (axlError ** error,
! 60: ...);
! 61:
! 62: axlDoc * axl_doc_parse_from_file (const char * file_path,
! 63: axlError ** error);
! 64:
! 65: axl_bool axl_doc_dump (axlDoc * doc,
! 66: char ** content,
! 67: int * size);
! 68:
! 69: axl_bool axl_doc_dump_pretty (axlDoc * doc,
! 70: char ** content,
! 71: int * size,
! 72: int tabular);
! 73:
! 74: axl_bool axl_doc_dump_to_file (axlDoc * doc,
! 75: const char * file_path);
! 76:
! 77: axl_bool axl_doc_dump_pretty_to_file (axlDoc * doc,
! 78: const char * file_path,
! 79: int tabular);
! 80:
! 81: int axl_doc_get_flat_size (axlDoc * doc);
! 82:
! 83: axl_bool axl_doc_are_equal (axlDoc * doc,
! 84: axlDoc * doc2);
! 85:
! 86: axl_bool axl_doc_are_equal_trimmed (axlDoc * doc,
! 87: axlDoc * doc2);
! 88:
! 89: axl_bool axl_doc_are_equal_full (axlDoc * doc,
! 90: axlDoc * doc2,
! 91: axl_bool trimmed,
! 92: axlError ** error);
! 93:
! 94: axlNode * axl_doc_get_root (axlDoc * doc);
! 95:
! 96: void axl_doc_set_root (axlDoc * doc,
! 97: axlNode * root);
! 98:
! 99: axlList * axl_doc_get_list (axlDoc * doc,
! 100: const char * path_to);
! 101:
! 102: axlNode * axl_doc_get (axlDoc * doc,
! 103: const char * path_to);
! 104:
! 105: /**
! 106: * @brief Convenience macro that allows to call \ref
! 107: * axl_node_find_called, providing a document, making the parent
! 108: * reference to use the root document node.
! 109: *
! 110: * See \ref axl_node_find_called for more information.
! 111: *
! 112: * @param doc The document where the node lookup will be produced.
! 113: * @param name The child node name that is looked up.
! 114: *
! 115: * @return A reference to the node found or NULL if it fails to find
! 116: * the node requested.
! 117: */
! 118: #define axl_doc_find_called(doc,name) (axl_node_find_called(axl_doc_get_root(doc),name))
! 119:
! 120: const char * axl_doc_get_content_at (axlDoc * doc,
! 121: const char * path_to,
! 122: int * content_size);
! 123:
! 124: const char * axl_doc_get_encoding (axlDoc * doc);
! 125:
! 126: axl_bool axl_doc_get_standalone (axlDoc * doc);
! 127:
! 128: void axl_doc_free (axlDoc * doc);
! 129:
! 130: void axl_doc_set_child_current_parent (axlDoc * doc,
! 131: axlNode * node);
! 132:
! 133: void axl_doc_pop_current_parent (axlDoc * doc);
! 134:
! 135: void axl_doc_add_pi_target (axlDoc * doc,
! 136: char * target,
! 137: char * content);
! 138:
! 139: axl_bool axl_doc_has_pi_target (axlDoc * doc,
! 140: char * pi_target);
! 141:
! 142: char * axl_doc_get_pi_target_content (axlDoc * doc,
! 143: char * pi_target);
! 144:
! 145: axlList * axl_doc_get_pi_target_list (axlDoc * doc);
! 146:
! 147: axlPI * axl_pi_create (char * name,
! 148: char * content);
! 149:
! 150: axlPI * axl_pi_copy (axlPI * pi);
! 151:
! 152: axl_bool axl_pi_are_equal (axlPI * pi,
! 153: axlPI * pi2);
! 154:
! 155: char * axl_pi_get_name (axlPI * pi);
! 156:
! 157: char * axl_pi_get_content (axlPI * pi);
! 158:
! 159: void axl_pi_free (axlPI * pi);
! 160:
! 161: int axl_pi_get_size (axlPI * pi);
! 162:
! 163: axl_bool axl_doc_iterate (axlDoc * doc,
! 164: AxlIterationMode mode,
! 165: axlIterationFunc func,
! 166: axlPointer ptr);
! 167:
! 168: axl_bool axl_doc_iterate_full (axlDoc * doc,
! 169: AxlIterationMode mode,
! 170: axlIterationFunc2 func,
! 171: axlPointer ptr,
! 172: axlPointer ptr2);
! 173:
! 174: axl_bool axl_doc_iterate_full_from (axlDoc * doc,
! 175: axlNode * starting_from,
! 176: AxlIterationMode mode,
! 177: axlIterationFunc2 func,
! 178: axlPointer ptr,
! 179: axlPointer ptr2);
! 180:
! 181: /* private API starts from here, do not use this API */
! 182:
! 183: axl_bool axl_doc_consume_comments (axlDoc * doc,
! 184: axlStream * stream,
! 185: axlError ** error);
! 186:
! 187: axl_bool axl_doc_consume_pi (axlDoc * doc,
! 188: axlNode * node,
! 189: axlStream * stream,
! 190: axlError ** error);
! 191:
! 192: axlFactory * axl_doc_get_item_factory (axlDoc * doc);
! 193:
! 194: /* configuration API */
! 195: axlDocDetectCodification axl_doc_set_detect_codification_func (axlDocDetectCodification func,
! 196: axlPointer user_data);
! 197:
! 198: axlDocConfigureCodification axl_doc_set_configure_codification_func (axlDocConfigureCodification func,
! 199: axlPointer user_data);
! 200:
! 201: /* @} */
! 202:
! 203: END_C_DECLS
! 204:
! 205: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>