[xml] libxml 2 Bug

Date view Thread view Subject view Author view

From: Terry Lee (terori@hotmail.com)
Date: Thu Feb 08 2001 - 02:36:57 EST


I have encounter this problem

if sample.xml contain
<!DOCTYPE Sample SYSTEM "sample.dtd">

//Fail ==============================
 xmlDocPtr newDoc = xmlParseFile("sample.xml");
 xmlDocPtr temp;
 temp = xmlCopyDoc(newDoc,1);
 xmlSaveFile("./test.txt",temp);
==============================
then there is segmentation fault

but if i do
//Work ==============================
 xmlDocPtr newDoc = xmlParseFile("sample.xml");
 xmlDocPtr temp;
 temp = xmlCopyDoc(newDoc,1);
 xmlFreeDoc(newDoc); //##### new line ####
xmlSaveFile("./test.txt",temp);
==============================

if sample.xml do not contain
<!DOCTYPE Sample SYSTEM "sample.dtd">
both case work.

I am using libxml-2.2.2.12
the problem exist in windows 2000, NT and linux RedHat 7.0

Terry

 

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Feb 08 2001 - 06:43:29 EST