NSXMLDTD
NSXMLDTD
- Subject: NSXMLDTD
- From: Niels Meersschaert <email@hidden>
- Date: Tue, 4 Apr 2006 01:53:25 -0400
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?
Thanks,
Niels
_______________________________________________
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