• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSXMLDTD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Ordered CoreData won't preserve selection
  • Next by Date: Displaying date in Core Data application
  • Previous by thread: Re: Ordered CoreData won't preserve selection
  • Next by thread: Re: NSXMLDTD
  • Index(es):
    • Date
    • Thread