Support > and  .

web
Michael R Sweet 22 years ago
parent 0855089dcd
commit 79c27ac3e2
  1. 2
      CHANGES
  2. 3
      index.html
  3. 14
      mxml-file.c

@ -5,6 +5,8 @@ README - 06/03/2003
CHANGES IN Mini-XML 0.93 CHANGES IN Mini-XML 0.93
- mxmlLoadFile() now correctly handles comments. - mxmlLoadFile() now correctly handles comments.
- mxmlLoadFile() now supports the "gt" and "nbsp"
character entities.
CHANGES IN Mini-XML 0.92 CHANGES IN Mini-XML 0.92

@ -10,7 +10,8 @@
</HEAD> </HEAD>
<BODY> <BODY>
<P CLASS="title" ALIGN="CENTER"><A HREF="../index.html">Back to Home Page</A></P> <P CLASS="title" ALIGN="CENTER">[&nbsp;<A
HREF="../index.html">Back to Home Page</A>&nbsp;]</P>
<H1 CLASS="title" ALIGN="CENTER">Mini-XML Home Page</H1> <H1 CLASS="title" ALIGN="CENTER">Mini-XML Home Page</H1>

@ -1,5 +1,5 @@
/* /*
* "$Id: mxml-file.c,v 1.3 2003/06/04 01:23:21 mike Exp $" * "$Id: mxml-file.c,v 1.4 2003/06/04 01:26:34 mike Exp $"
* *
* File loading code for mini-XML, a small XML-like file parsing library. * File loading code for mini-XML, a small XML-like file parsing library.
* *
@ -251,7 +251,7 @@ mxmlLoadFile(mxml_node_t *top, /* I - Top node */
{ {
/* /*
* Add character entity to current buffer... Currently we only * Add character entity to current buffer... Currently we only
* support &lt;, &amp;, &#nnn;, and &#xXXXX;... * support &lt;, &amp;, &gt;, &nbsp;, &#nnn;, and &#xXXXX;...
*/ */
char entity[64], /* Entity string */ char entity[64], /* Entity string */
@ -289,10 +289,14 @@ mxmlLoadFile(mxml_node_t *top, /* I - Top node */
else else
ch = strtol(entity + 2, NULL, 10); ch = strtol(entity + 2, NULL, 10);
} }
else if (!strcmp(entity, "&lt"))
ch = '<';
else if (!strcmp(entity, "&amp")) else if (!strcmp(entity, "&amp"))
ch = '&'; ch = '&';
else if (!strcmp(entity, "&gt"))
ch = '>';
else if (!strcmp(entity, "&lt"))
ch = '<';
else if (!strcmp(entity, "&nbsp"))
ch = 0xa0;
else else
{ {
fprintf(stderr, "Entity name \"%s;\" not supported under parent <%s>!\n", fprintf(stderr, "Entity name \"%s;\" not supported under parent <%s>!\n",
@ -668,5 +672,5 @@ mxml_write_string(const char *s, /* I - String to write */
/* /*
* End of "$Id: mxml-file.c,v 1.3 2003/06/04 01:23:21 mike Exp $". * End of "$Id: mxml-file.c,v 1.4 2003/06/04 01:26:34 mike Exp $".
*/ */

Loading…
Cancel
Save