Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > minidom and DTD

Reply
Thread Tools

minidom and DTD

 
 
Laszlo Zsolt Nagy
Guest
Posts: n/a
 
      05-23-2005

Hi All,

How can I put the

<!DOCTYPE collection SYSTEM "recipes.dtd">

thing into an XML created by xml.dom.minidom?

Of course I can parse the generated XML file and insert the DOCTYPE string
but there must be a standard way to do this...

Best,

Laci 2.0


 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      05-23-2005
Laszlo Zsolt Nagy wrote:
> How can I put the
>
> <!DOCTYPE collection SYSTEM "recipes.dtd">
>
> thing into an XML created by xml.dom.minidom?


You should put a DocumentType node into your
DocumentNode, and pass a qualifiedName of
"collection" and a systemId of "recipes.dtd"
to the createDocumentType call.

Regards,
Martin
 
Reply With Quote
 
 
 
 
Laszlo Zsolt Nagy
Guest
Posts: n/a
 
      05-23-2005
Martin v. L÷wis wrote:

>Laszlo Zsolt Nagy wrote:
>
>
>>How can I put the
>>
>><!DOCTYPE collection SYSTEM "recipes.dtd">
>>
>>thing into an XML created by xml.dom.minidom?
>>
>>

>
>You should put a DocumentType node into your
>DocumentNode, and pass a qualifiedName of
>"collection" and a systemId of "recipes.dtd"
>to the createDocumentType call.
>
>

That worked, thank you.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing _xmlplus.dom.minidom with xml.dom.minidom aine_canby@yahoo.com Python 3 08-03-2007 03:50 PM
XML file from one DTD to another DTD test Java 2 07-28-2006 08:48 PM
How to specify DTD to DTD.getDTD for DocumentParser? Ronald Fischer Java 4 03-17-2005 09:37 AM
Removing the dtd name when using print(...) on the dtd generated class Joseph Tilian Java 0 12-21-2004 02:58 PM
Including a dtd into another dtd... possible? Asfand Yar Qazi XML 1 09-19-2003 12:10 PM



Advertisments