Diff for /XML/tree.c between versions 1.87 and 1.88

version 1.87, 2000/01/27 16:51:12 version 1.88, 2000/02/09 13:34:45
Line 1396  xmlNewTextChild(xmlNodePtr parent, xmlNs Line 1396  xmlNewTextChild(xmlNodePtr parent, xmlNs
 }  }
   
 /**  /**
    * xmlNewCharRef:
    * @doc: the document
    * @name:  the char ref string, starting with # or "&# ... ;"
    *
    * Creation of a new character reference node.
    * Returns a pointer to the new node object.
    */
   xmlNodePtr
   xmlNewCharRef(xmlDocPtr doc, const xmlChar *name) {
       xmlNodePtr cur;
   
       /*
        * Allocate a new node and fill the fields.
        */
       cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
       if (cur == NULL) {
           fprintf(stderr, "xmlNewText : malloc failed\n");
           return(NULL);
       }
   
       cur->type = XML_ENTITY_REF_NODE;
       cur->doc = doc;
       cur->parent = NULL; 
       cur->next = NULL; 
       cur->prev = NULL; 
       cur->childs = NULL; 
       cur->last = NULL; 
       cur->properties = NULL; 
       if (name[0] == '&') {
           int len;
           name++;
           len = xmlStrlen(name);
           if (name[len - 1] == ';')
               cur->name = xmlStrndup(name, len - 1);
           else
               cur->name = xmlStrndup(name, len);
       } else
           cur->name = xmlStrdup(name);
       cur->ns = NULL;
       cur->nsDef = NULL;
       cur->content = NULL;
   #ifndef XML_WITHOUT_CORBA
       cur->_private = NULL;
       cur->vepv = NULL;
   #endif    
       return(cur);
   }
   
   /**
  * xmlNewReference:   * xmlNewReference:
  * @doc: the document   * @doc: the document
  * @name:  the reference name, or the reference string with & and ;   * @name:  the reference name, or the reference string with & and ;

Removed from v.1.87  
changed lines
  Added in v.1.88


Webmaster