diff --git a/CHANGES b/CHANGES index 52cadb2..06e1adf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,15 @@ -README - 05/02/2004 +README - 05/16/2004 ------------------- CHANGES IN Mini-XML 2.0 - New programmers manual. + - Added index functions to build a searchable index of + XML nodes. + - Added character entity callback interface to support + additional character entities beyond those defined in + the XHTML specification. + - Added support for XHTML character entities. - The mxmldoc utility now produces XML output which conforms to an updated XML schema, described in the file "doc/mxmldoc.xsd". diff --git a/Makefile.in b/Makefile.in index 7cba763..711734e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # -# "$Id: Makefile.in,v 1.20 2004/05/02 22:02:36 mike Exp $" +# "$Id: Makefile.in,v 1.21 2004/05/16 05:25:38 mike Exp $" # # Makefile for Mini-XML, a small XML-like file parsing library. # @@ -76,8 +76,8 @@ MAN3EXT = @MAN3EXT@ DOCFILES = doc/mxml.html doc/mxml.pdf doc/mxmldoc.xsd \ README COPYING CHANGES -PUBLIBOBJS = mxml-attr.o mxml-entity.o mxml-file.o mxml-node.o \ - mxml-search.o mxml-set.o +PUBLIBOBJS = mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o \ + mxml-node.o mxml-search.o mxml-set.o LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o OBJS = mxmldoc.o testmxml.o $(LIBOBJS) TARGETS = libmxml.a mxmldoc doc/mxml.$(CAT3EXT) \ @@ -257,5 +257,5 @@ $(OBJS): Makefile config.h # -# End of "$Id: Makefile.in,v 1.20 2004/05/02 22:02:36 mike Exp $". +# End of "$Id: Makefile.in,v 1.21 2004/05/16 05:25:38 mike Exp $". # diff --git a/TODO b/TODO index 6852006..05af08e 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -TODO - 05/02/2004 +TODO - 05/16/2004 ----------------- - UTF-16 support. @@ -9,12 +9,6 @@ TODO - 05/02/2004 -- Use HTMLDOC to generate -- Provide more tutorials -- Release notes - - Add indexing support. - -- Build static index of nodes based on element and/or attribute - (i.e. index elements, index attributes, or index attributes of - a specific element) - -- Provide functions to create, destroy, find first, and find next - -- Provide additional index for first character? - Add access methods and make node structure opaque. -- To allow for C++ migration -- To make future binary compatibility easier @@ -24,6 +18,3 @@ TODO - 05/02/2004 -- Make this the core implementation which the C API accesses? -- Class would allow for subclassing, is that necessary? - Binary XML support??? - - Character entity support - -- Add support for a callback which returns a Unicode - char from an entity name. diff --git a/doc/reference.html b/doc/reference.html index 762d43b..c5a9c88 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -17,6 +17,7 @@
Nothing.
+Add a callback to convert entities to Unicode.
++void +mxmlEntityAddCallback( + int (*cb)(const char *name)); ++
Name | Description |
---|---|
(*cb)(const char *name) | Callback function to add |
Nothing.
+Character value or -1 on error
+Remove a callback.
++void +mxmlEntityRemoveCallback( + int (*cb)(const char *name)); ++
Name | Description |
---|---|
(*cb)(const char *name) | Callback function to remove |
Nothing.
+Element node or NULL
+Sort attribute...
++void +mxmlIndexDelete( + mxml_index_t * ind); ++
Name | Description |
---|---|
ind | Index to delete |
Nothing.
+ +Return the next node in the index.
++mxml_node_t * +mxmlIndexEnum( + mxml_index_t * ind); ++
Name | Description |
---|---|
ind | Index to enumerate |
Next node or NULL if there is none
+ +Find the next matching node.
++mxml_node_t * +mxmlIndexFind( + mxml_index_t * ind, + const char * element, + const char * value); ++
Name | Description |
---|---|
ind | Index to search |
element | Element name to find, if any |
value | Attribute value, if any |
Node or NULL if none found
+ +Create a new index.
++mxml_index_t * +mxmlIndexNew( + mxml_node_t * node, + const char * element, + const char * attr); ++
Name | Description |
---|---|
node | XML node tree |
element | Element to index or NULL for all |
attr | Attribute to index or NULL for none |
New index
+ +Return the first node in the index.
++mxml_node_t * +mxmlIndexReset( + mxml_index_t * ind); ++
Name | Description |
---|---|
ind | Index to reset |
First node or NULL if there is none
+An XML node index.
++struct mxml_index_s +{ + int alloc_nodes; + char * attr; + int cur_node; + mxml_node_t ** nodes; + int num_nodes; +}; ++
Name | Description |
---|---|
alloc_nodes | Allocated nodes in index |
attr | Attribute used for indexing or NULL |
cur_node | Current node |
nodes | Node array |
num_nodes | Number of nodes in index |
An XML node index.
++typedef struct mxml_index_s mxml_index_t; ++
+static int num_callbacks = 1; ++ +
Delete an index.
++static const char * sort_attr_name; +