[xml] usage of xmlCreateIntSubset()
- From: "Dr. Guenter Schmidt" <guenter schmidt bruker-biospin de>
- To: xml gnome org
- Subject: [xml] usage of xmlCreateIntSubset()
- Date: Thu, 14 Feb 2002 16:34:38 +0100
I wan' to create very simple xml files with a '<!DOCTYPE' entry.
<?xml version="1.0"?>
<!DOCTYPE delout SYSTEM
"c:/bruker/xwin-nmr/classes/prop/dtd/delout.dtd">
<delout>
<dataset_list cmd="delp">
<dataset>
<name>exam1d_13C</name>
<expno>100</expno>
</dataset>
</dataset_list>
</delout>
Without the 'DOCTYPE' line, I can use code like this:
doc = xmlNewDoc("1.0");
doc->children = xmlNewDocNode (doc, NULL, root_name, NULL);
subtree = xmlNewChild(doc->children, NULL, "dataset_list",
NULL);
name = xmlNewChild(subtree,NULL, "name","exam1d_13C");
expno = xmlNewChild(subtree,NULL, "expno","100");
xmlSaveFormatFileEnc("-",doc,"UTF-8",1);
In the old mailing list archives I found the hints to use
xmlCreateIntSubset(),
for the 'DOCTYPE', but I didnt succed. With
dtd = xmlCreateIntSubset(doc,root_name,NULL,DTD_name);
doc->intSubset = dtd;
the output is still the same.
Thanks,
--
Dr. Günter Schmidt | Bruker BioSpin GmbH
| NMR Software Department
E-Mail: Guenter Schmidt Bruker DE | Silberstreifen
Phone: +49 721 5161-443 / Fax:-480 | D-76287 Rheinstetten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]