Diff for /XML/tree.c between versions 1.35 and 1.36

version 1.35, 1999/02/21 15:38:57 version 1.36, 1999/02/22 12:02:49
Line 77  xmlUpgradeOldNs(xmlDocPtr doc) { Line 77  xmlUpgradeOldNs(xmlDocPtr doc) {
  * @prefix:  the prefix for the namespace   * @prefix:  the prefix for the namespace
  *   *
  * Creation of a new Namespace.   * Creation of a new Namespace.
  * return values: returns a new namespace pointer   * Returns returns a new namespace pointer
  */   */
 xmlNsPtr  xmlNsPtr
 xmlNewNs(xmlNodePtr node, const CHAR *href, const CHAR *prefix) {  xmlNewNs(xmlNodePtr node, const CHAR *href, const CHAR *prefix) {
Line 132  xmlNewNs(xmlNodePtr node, const CHAR *hr Line 132  xmlNewNs(xmlNodePtr node, const CHAR *hr
  * @prefix:  the prefix for the namespace   * @prefix:  the prefix for the namespace
  *   *
  * Creation of a Namespace, the old way using PI and without scoping, to AVOID.   * Creation of a Namespace, the old way using PI and without scoping, to AVOID.
  * return values: returns a new namespace pointer   * Returns returns a new namespace pointer
  */   */
 xmlNsPtr  xmlNsPtr
 xmlNewGlobalNs(xmlDocPtr doc, const CHAR *href, const CHAR *prefix) {  xmlNewGlobalNs(xmlDocPtr doc, const CHAR *href, const CHAR *prefix) {
Line 237  xmlFreeNsList(xmlNsPtr cur) { Line 237  xmlFreeNsList(xmlNsPtr cur) {
  * @SystemID:  the system ID   * @SystemID:  the system ID
  *   *
  * Creation of a new DTD.   * Creation of a new DTD.
  * return values: a pointer to the new DTD structure   * Returns a pointer to the new DTD structure
  */   */
 xmlDtdPtr  xmlDtdPtr
 xmlNewDtd(xmlDocPtr doc, const CHAR *name,  xmlNewDtd(xmlDocPtr doc, const CHAR *name,
Line 288  xmlNewDtd(xmlDocPtr doc, const CHAR *nam Line 288  xmlNewDtd(xmlDocPtr doc, const CHAR *nam
  * @ExternalID:  the external ID   * @ExternalID:  the external ID
  * @SystemID:  the system ID   * @SystemID:  the system ID
  *   *
  * Creatte the internal subset of a document   * Create the internal subset of a document
  * return values: a pointer to the new DTD structure   * Returns a pointer to the new DTD structure
  */   */
 xmlDtdPtr  xmlDtdPtr
 xmlCreateIntSubset(xmlDocPtr doc, const CHAR *name,  xmlCreateIntSubset(xmlDocPtr doc, const CHAR *name,
Line 365  xmlFreeDtd(xmlDtdPtr cur) { Line 365  xmlFreeDtd(xmlDtdPtr cur) {
  * xmlNewDoc:   * xmlNewDoc:
  * @version:  CHAR string giving the version of XML "1.0"   * @version:  CHAR string giving the version of XML "1.0"
  *   *
  * Create a new document   * Returns a new document
  */   */
 xmlDocPtr  xmlDocPtr
 xmlNewDoc(const CHAR *version) {  xmlNewDoc(const CHAR *version) {
Line 432  xmlFreeDoc(xmlDocPtr cur) { Line 432  xmlFreeDoc(xmlDocPtr cur) {
  * xmlStringLenGetNodeList:   * xmlStringLenGetNodeList:
  * @doc:  the document   * @doc:  the document
  * @value:  the value of the text   * @value:  the value of the text
  * @int len:  the length of the string value   * @len:  the length of the string value
  *   *
  * Parse the value string and build the node list associated. Should   * Parse the value string and build the node list associated. Should
  * produce a flat tree with only TEXTs and ENTITY_REFs.   * produce a flat tree with only TEXTs and ENTITY_REFs.
  * return values: a pointer to the first child   * Returns a pointer to the first child
  */   */
 xmlNodePtr  xmlNodePtr
 xmlStringLenGetNodeList(xmlDocPtr doc, const CHAR *value, int len) {  xmlStringLenGetNodeList(xmlDocPtr doc, const CHAR *value, int len) {
Line 547  xmlStringLenGetNodeList(xmlDocPtr doc, c Line 547  xmlStringLenGetNodeList(xmlDocPtr doc, c
  *   *
  * Parse the value string and build the node list associated. Should   * Parse the value string and build the node list associated. Should
  * produce a flat tree with only TEXTs and ENTITY_REFs.   * produce a flat tree with only TEXTs and ENTITY_REFs.
  * return values: a pointer to the first child   * Returns a pointer to the first child
  */   */
 xmlNodePtr  xmlNodePtr
 xmlStringGetNodeList(xmlDocPtr doc, const CHAR *value) {  xmlStringGetNodeList(xmlDocPtr doc, const CHAR *value) {
Line 659  xmlStringGetNodeList(xmlDocPtr doc, cons Line 659  xmlStringGetNodeList(xmlDocPtr doc, cons
  *   *
  * Returns the string equivalent to the text contained in the Node list   * Returns the string equivalent to the text contained in the Node list
  * made of TEXTs and ENTITY_REFs   * made of TEXTs and ENTITY_REFs
  * return values: a pointer to the string copy, the calller must free it.   * Returns a pointer to the string copy, the calller must free it.
  */   */
 CHAR *  CHAR *
 xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) {  xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) {
Line 709  xmlNodeListGetString(xmlDocPtr doc, xmlN Line 709  xmlNodeListGetString(xmlDocPtr doc, xmlN
  * @value:  the value of the attribute   * @value:  the value of the attribute
  *   *
  * Create a new property carried by a node.   * Create a new property carried by a node.
  * return values: a pointer to the attribute   * Returns a pointer to the attribute
  */   */
 xmlAttrPtr  xmlAttrPtr
 xmlNewProp(xmlNodePtr node, const CHAR *name, const CHAR *value) {  xmlNewProp(xmlNodePtr node, const CHAR *name, const CHAR *value) {
Line 765  xmlNewProp(xmlNodePtr node, const CHAR * Line 765  xmlNewProp(xmlNodePtr node, const CHAR *
  * @value:  the value of the attribute   * @value:  the value of the attribute
  *   *
  * Create a new property carried by a document.   * Create a new property carried by a document.
  * return values: a pointer to the attribute   * Returns a pointer to the attribute
  */   */
 xmlAttrPtr  xmlAttrPtr
 xmlNewDocProp(xmlDocPtr doc, const CHAR *name, const CHAR *value) {  xmlNewDocProp(xmlDocPtr doc, const CHAR *name, const CHAR *value) {
Line 843  xmlFreeProp(xmlAttrPtr cur) { Line 843  xmlFreeProp(xmlAttrPtr cur) {
  * xmlNewNode:   * xmlNewNode:
  * @ns:  namespace if any   * @ns:  namespace if any
  * @name:  the node name   * @name:  the node name
  * @content:  the text content if any  
  *   *
  * Creation of a new node element. @ns and @content are optionnal (NULL).   * Creation of a new node element. @ns and @content are optionnal (NULL).
  * If content is non NULL, a child list containing the TEXTs and   * If content is non NULL, a child list containing the TEXTs and
  * ENTITY_REFs node will be created.   * ENTITY_REFs node will be created.
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewNode(xmlNsPtr ns, const CHAR *name) {  xmlNewNode(xmlNsPtr ns, const CHAR *name) {
Line 896  xmlNewNode(xmlNsPtr ns, const CHAR *name Line 895  xmlNewNode(xmlNsPtr ns, const CHAR *name
  *   *
  * Creation of a new node element within a document. @ns and @content   * Creation of a new node element within a document. @ns and @content
  * are optionnal (NULL).   * are optionnal (NULL).
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns,  xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns,
Line 920  xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns Line 919  xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns
  * @content:  the text content   * @content:  the text content
  *   *
  * Creation of a new text node.   * Creation of a new text node.
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewText(const CHAR *content) {  xmlNewText(const CHAR *content) {
Line 960  xmlNewText(const CHAR *content) { Line 959  xmlNewText(const CHAR *content) {
  * @name:  the reference name, or the reference string with & and ;   * @name:  the reference name, or the reference string with & and ;
  *   *
  * Creation of a new reference node.   * Creation of a new reference node.
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewReference(xmlDocPtr doc, const CHAR *name) {  xmlNewReference(xmlDocPtr doc, const CHAR *name) {
Line 1011  xmlNewReference(xmlDocPtr doc, const CHA Line 1010  xmlNewReference(xmlDocPtr doc, const CHA
  * @content:  the text content   * @content:  the text content
  *   *
  * Creation of a new text node within a document.   * Creation of a new text node within a document.
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewDocText(xmlDocPtr doc, const CHAR *content) {  xmlNewDocText(xmlDocPtr doc, const CHAR *content) {
Line 1028  xmlNewDocText(xmlDocPtr doc, const CHAR Line 1027  xmlNewDocText(xmlDocPtr doc, const CHAR
  * @len:  the text len.   * @len:  the text len.
  *   *
  * Creation of a new text node with an extra parameter for the content's lenght   * Creation of a new text node with an extra parameter for the content's lenght
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewTextLen(const CHAR *content, int len) {  xmlNewTextLen(const CHAR *content, int len) {
Line 1070  xmlNewTextLen(const CHAR *content, int l Line 1069  xmlNewTextLen(const CHAR *content, int l
  *   *
  * Creation of a new text node with an extra content lenght parameter. The   * Creation of a new text node with an extra content lenght parameter. The
  * text node pertain to a given document.   * text node pertain to a given document.
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewDocTextLen(xmlDocPtr doc, const CHAR *content, int len) {  xmlNewDocTextLen(xmlDocPtr doc, const CHAR *content, int len) {
Line 1086  xmlNewDocTextLen(xmlDocPtr doc, const CH Line 1085  xmlNewDocTextLen(xmlDocPtr doc, const CH
  * @content:  the comment content   * @content:  the comment content
  *   *
  * Creation of a new node containing a comment.   * Creation of a new node containing a comment.
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewComment(CHAR *content) {  xmlNewComment(CHAR *content) {
Line 1121  xmlNewComment(CHAR *content) { Line 1120  xmlNewComment(CHAR *content) {
 }  }
   
 /**  /**
  * xmlNewComment:   * xmlNewDocComment:
  * @doc:  the document   * @doc:  the document
  * @content:  the comment content   * @content:  the comment content
  *   *
  * Creation of a new node containing a commentwithin a document.   * Creation of a new node containing a commentwithin a document.
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewDocComment(xmlDocPtr doc, CHAR *content) {  xmlNewDocComment(xmlDocPtr doc, CHAR *content) {
Line 1148  xmlNewDocComment(xmlDocPtr doc, CHAR *co Line 1147  xmlNewDocComment(xmlDocPtr doc, CHAR *co
  * Creation of a new child element, added at the end of @parent childs list.   * Creation of a new child element, added at the end of @parent childs list.
  * @ns and @content parameters are optionnal (NULL). If content is non NULL,   * @ns and @content parameters are optionnal (NULL). If content is non NULL,
  * a child list containing the TEXTs and ENTITY_REFs node will be created.   * a child list containing the TEXTs and ENTITY_REFs node will be created.
  * return values: a pointer to the new node object.   * Returns a pointer to the new node object.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlNewChild(xmlNodePtr parent, xmlNsPtr ns,  xmlNewChild(xmlNodePtr parent, xmlNsPtr ns,
Line 1199  xmlNewChild(xmlNodePtr parent, xmlNsPtr Line 1198  xmlNewChild(xmlNodePtr parent, xmlNsPtr
  * @cur:  the child node   * @cur:  the child node
  *   *
  * Add a new child element, to @parent, at the end of the child list.   * Add a new child element, to @parent, at the end of the child list.
  * return values: the child or NULL in case of error.   * Returns the child or NULL in case of error.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) {  xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) {
Line 1262  xmlAddChild(xmlNodePtr parent, xmlNodePt Line 1261  xmlAddChild(xmlNodePtr parent, xmlNodePt
  * @parent:  the parent node   * @parent:  the parent node
  *   *
  * Search the last child of a node.   * Search the last child of a node.
  * return values: the last child or NULL if none.   * Returns the last child or NULL if none.
  */   */
 xmlNodePtr  xmlNodePtr
 xmlGetLastChild(xmlNodePtr parent) {  xmlGetLastChild(xmlNodePtr parent) {
Line 1707  xmlCopyDoc(xmlDocPtr doc, int recursive) Line 1706  xmlCopyDoc(xmlDocPtr doc, int recursive)
  * directly by this node if it's a TEXT node or the aggregate string   * directly by this node if it's a TEXT node or the aggregate string
  * of the values carried by this node child's (TEXT and ENTITY_REF).   * of the values carried by this node child's (TEXT and ENTITY_REF).
  * Entity references are substitued.   * Entity references are substitued.
  * Return value: a new CHAR * or NULL if no content is available.   * Returns a new CHAR * or NULL if no content is available.
  */   */
 CHAR *  CHAR *
 xmlNodeGetContent(xmlNodePtr cur) {  xmlNodeGetContent(xmlNodePtr cur) {
Line 1923  xmlNodeAddContent(xmlNodePtr cur, const Line 1922  xmlNodeAddContent(xmlNodePtr cur, const
  * @second:  the second text node being merged   * @second:  the second text node being merged
  *    * 
  * Merge two text nodes into one   * Merge two text nodes into one
  * Return values: the first text node augmented   * Returns the first text node augmented
  */   */
 xmlNodePtr  xmlNodePtr
 xmlTextMerge(xmlNodePtr first, xmlNodePtr second) {  xmlTextMerge(xmlNodePtr first, xmlNodePtr second) {
Line 1947  xmlTextMerge(xmlNodePtr first, xmlNodePt Line 1946  xmlTextMerge(xmlNodePtr first, xmlNodePt
  * recurse on the parents until it finds the defined namespace   * recurse on the parents until it finds the defined namespace
  * or return NULL otherwise.   * or return NULL otherwise.
  * @nameSpace can be NULL, this is a search for the default namespace.   * @nameSpace can be NULL, this is a search for the default namespace.
  * return values: the namespace pointer or NULL.   * Returns the namespace pointer or NULL.
  */   */
 xmlNsPtr  xmlNsPtr
 xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const CHAR *nameSpace) {  xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const CHAR *nameSpace) {
Line 1985  xmlSearchNs(xmlDocPtr doc, xmlNodePtr no Line 1984  xmlSearchNs(xmlDocPtr doc, xmlNodePtr no
  *   *
  * Search a Ns aliasing a given URI. Recurse on the parents until it finds   * Search a Ns aliasing a given URI. Recurse on the parents until it finds
  * the defined namespace or return NULL otherwise.   * the defined namespace or return NULL otherwise.
  * return values: the namespace pointer or NULL.   * Returns the namespace pointer or NULL.
  */   */
 xmlNsPtr  xmlNsPtr
 xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const CHAR *href) {  xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const CHAR *href) {
Line 2020  xmlSearchNsByHref(xmlDocPtr doc, xmlNode Line 2019  xmlSearchNsByHref(xmlDocPtr doc, xmlNode
  *   *
  * Search and get the value of an attribute associated to a node   * Search and get the value of an attribute associated to a node
  * This does the entity substitution.   * This does the entity substitution.
  * return values: the attribute value or NULL if not found.   * Returns the attribute value or NULL if not found.
  */   */
 CHAR *xmlGetProp(xmlNodePtr node, const CHAR *name) {  CHAR *xmlGetProp(xmlNodePtr node, const CHAR *name) {
     xmlAttrPtr prop = node->properties;      xmlAttrPtr prop = node->properties;
Line 2045  CHAR *xmlGetProp(xmlNodePtr node, const Line 2044  CHAR *xmlGetProp(xmlNodePtr node, const
  * @value:  the attribute value   * @value:  the attribute value
  *   *
  * Set (or reset) an attribute carried by a node.   * Set (or reset) an attribute carried by a node.
  * return values: the attribute pointer.   * Returns the attribute pointer.
  */   */
 xmlAttrPtr  xmlAttrPtr
 xmlSetProp(xmlNodePtr node, const CHAR *name, const CHAR *value) {  xmlSetProp(xmlNodePtr node, const CHAR *name, const CHAR *value) {
Line 2071  xmlSetProp(xmlNodePtr node, const CHAR * Line 2070  xmlSetProp(xmlNodePtr node, const CHAR *
  * @node:  the node   * @node:  the node
  *    * 
  * Is this node a Text node ?   * Is this node a Text node ?
  * return values: 1 yes, 0 no   * Returns 1 yes, 0 no
  */   */
 int  int
 xmlNodeIsText(xmlNodePtr node) {  xmlNodeIsText(xmlNodePtr node) {
Line 2082  xmlNodeIsText(xmlNodePtr node) { Line 2081  xmlNodeIsText(xmlNodePtr node) {
 }  }
   
 /**  /**
  * xmlNodeIsText:   * xmlTextConcat:
  * @node:  the node   * @node:  the node
  * @content:  the content   * @content:  the content
  * @len:  @content lenght   * @len:  @content lenght
Line 2535  xmlDocDumpMemory(xmlDocPtr cur, CHAR**me Line 2534  xmlDocDumpMemory(xmlDocPtr cur, CHAR**me
  * @doc:  the document   * @doc:  the document
  *   *
  * get the compression ratio for a document, ZLIB based   * get the compression ratio for a document, ZLIB based
  * return values: 0 (uncompressed) to 9 (max compression)   * Returns 0 (uncompressed) to 9 (max compression)
  */   */
 int  int
  xmlGetDocCompressMode (xmlDocPtr doc) {   xmlGetDocCompressMode (xmlDocPtr doc) {
Line 2563  xmlSetDocCompressMode (xmlDocPtr doc, in Line 2562  xmlSetDocCompressMode (xmlDocPtr doc, in
  * xmlGetCompressMode:   * xmlGetCompressMode:
  *   *
  * get the default compression mode used, ZLIB based.   * get the default compression mode used, ZLIB based.
  * return values: 0 (uncompressed) to 9 (max compression)   * Returns 0 (uncompressed) to 9 (max compression)
  */   */
 int  int
  xmlGetCompressMode(void) {   xmlGetCompressMode(void) {

Removed from v.1.35  
changed lines
  Added in v.1.36


Webmaster