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 @@
  • Structures
  • Types
  • Unions
  • +
  • Variables
  • Enumerations

    @@ -45,9 +46,16 @@
  • mxmlDelete()
  • mxmlElementGetAttr()
  • mxmlElementSetAttr()
  • +
  • mxmlEntityAddCallback()
  • mxmlEntityGetName()
  • mxmlEntityGetValue()
  • +
  • mxmlEntityRemoveCallback()
  • mxmlFindElement()
  • +
  • mxmlIndexDelete()
  • +
  • mxmlIndexEnum()
  • +
  • mxmlIndexFind()
  • +
  • mxmlIndexNew()
  • +
  • mxmlIndexReset()
  • mxmlLoadFile()
  • mxmlLoadString()
  • mxmlNewElement()
  • @@ -177,6 +185,25 @@ mxmlElementSetAttr(

    Returns

    Nothing.

    +

    mxmlEntityAddCallback()

    +
    +

    Description

    +

    Add a callback to convert entities to Unicode.

    +

    Syntax

    +
    +void
    +mxmlEntityAddCallback(
    +    int (*cb)(const char *name));
    +
    +

    Arguments

    +

    + + + +
    NameDescription
    (*cb)(const char *name)Callback function to add

    +

    Returns

    +

    Nothing.

    +

    mxmlEntityGetName()


    Description

    @@ -220,6 +247,25 @@ mxmlEntityGetValue(

    Returns

    Character value or -1 on error

    +

    mxmlEntityRemoveCallback()

    +
    +

    Description

    +

    Remove a callback.

    +

    Syntax

    +
    +void
    +mxmlEntityRemoveCallback(
    +    int (*cb)(const char *name));
    +
    +

    Arguments

    +

    + + + +
    NameDescription
    (*cb)(const char *name)Callback function to remove

    +

    Returns

    +

    Nothing.

    +

    mxmlFindElement()


    Description

    @@ -258,6 +304,109 @@ mxmlFindElement(

    Returns

    Element node or NULL

    +

    mxmlIndexDelete()

    +
    +

    Description

    +

    Sort attribute...

    +

    Syntax

    +
    +void
    +mxmlIndexDelete(
    +    mxml_index_t * ind);
    +
    +

    Arguments

    +

    + + + +
    NameDescription
    indIndex to delete

    +

    Returns

    +

    Nothing.

    + +

    mxmlIndexEnum()

    +
    +

    Description

    +

    Return the next node in the index.

    +

    Syntax

    +
    +mxml_node_t *
    +mxmlIndexEnum(
    +    mxml_index_t * ind);
    +
    +

    Arguments

    +

    + + + +
    NameDescription
    indIndex to enumerate

    +

    Returns

    +

    Next node or NULL if there is none

    + +

    mxmlIndexFind()

    +
    +

    Description

    +

    Find the next matching node.

    +

    Syntax

    +
    +mxml_node_t *
    +mxmlIndexFind(
    +    mxml_index_t * ind,
    +    const char * element,
    +    const char * value);
    +
    +

    Arguments

    +

    + + + + + +
    NameDescription
    indIndex to search
    elementElement name to find, if any
    valueAttribute value, if any

    +

    Returns

    +

    Node or NULL if none found

    + +

    mxmlIndexNew()

    +
    +

    Description

    +

    Create a new index.

    +

    Syntax

    +
    +mxml_index_t *
    +mxmlIndexNew(
    +    mxml_node_t * node,
    +    const char * element,
    +    const char * attr);
    +
    +

    Arguments

    +

    + + + + + +
    NameDescription
    nodeXML node tree
    elementElement to index or NULL for all
    attrAttribute to index or NULL for none

    +

    Returns

    +

    New index

    + +

    mxmlIndexReset()

    +
    +

    Description

    +

    Return the first node in the index.

    +

    Syntax

    +
    +mxml_node_t *
    +mxmlIndexReset(
    +    mxml_index_t * ind);
    +
    +

    Arguments

    +

    + + + +
    NameDescription
    indIndex to reset

    +

    Returns

    +

    First node or NULL if there is none

    +

    mxmlLoadFile()


    Description

    @@ -814,6 +963,7 @@ mxmlWalkPrev(

    Structures