Re: NSXMLDTD
Re: NSXMLDTD
- Subject: Re: NSXMLDTD
- From: Niels Meersschaert <email@hidden>
- Date: Tue, 4 Apr 2006 16:50:04 -0400
Many thanks.... that worked perfectly.
On Apr 4, 2006, at 2:42 PM, Matt Neuburg wrote:
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.
--
_______________________________________________
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
References: | |
| >Re: NSXMLDTD (From: Matt Neuburg <email@hidden>) |