RE: [xml] validate while parsing using IO-parser context

Hello Björn,

thanx for your reply.

-----Original Message-----
From: Bjorn Reese [mailto:breese mail1 stofanet dk]
Sent: Thursday, August 23, 2001 10:27 AM
To: Henke, Markus
Subject: Re: [xml] validate while parsing using IO-parser context

"Henke, Markus" wrote:

  ctxt->myDoc->URL = "C:/test/data/Test.xml"

This looks suspecious. Partly because it is not a valid URL, and
partly because you assign a constant string instead of a heap
copy of it. <snip/>

Yes, it's a hack and just for testing...

Try the following (warning: not tested)

  ctxt->myDoc->URL = xmlStrdup("file:///C%3A/test/data/Test.xml");

Well, done so. Won't work.  8(
The problem is, that "ctxt->myDoc" is "NULL" BEFORE parsing the document.
So i can't assign ANYTHING to "ctxt->myDoc->URL".
It'll work (also with a hardcoded string) if i validate the document AFTER
parsing it, but that's not what i want actual.

BTW: Do you know if i had to free a resource allocated by "xmlStrDup"?

Ciao, Markus

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]