Re: NSXMLDTD
Re: NSXMLDTD
- Subject: Re: NSXMLDTD
- From: Matt Neuburg <email@hidden>
- Date: Tue, 04 Apr 2006 11:42:51 -0700
- Thread-topic: NSXMLDTD
On Tue, 4 Apr 2006 01:53:25 -0400, Niels Meersschaert
<email@hidden> said:
>I'm working on an app that needs to write XML files that declare an
>external DTD.
>
>I need the output to look like:
>
><?xml version="1.0" encoding="UTF-8"?>
><!DOCTYPE rfp SYSTEM "http://host.domain.com/pathToDTD.dtd">
><rfp>
>..subelements
></rfp>
>
>I construct an NSXMLDocument using initWithRootElement:@"rfp". I
>also construct an NSXMLDTD. I then send [dtd setSystemID:@"http://
>host.domain.com/pathToDTD.dtd"]; and [xml setDTD:dtd];
>I set the version & encoding.
>
>The resulting output is
>
><?xml version="1.0" encoding="UTF-8"?>
><!DOCTYPE SYSTEM "http://host.domain.com/pathToDTD.dttd">
><rfp>
> ...subelements
></rfp>
>
>As you can see the DOCTYPE declaration is missing the root element,
>rfp. How do I make sure the dtd knows about the rootElement, without
>declaring the dtd inline?
Try [dtd setName:@"rfp"]. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden