• 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
Re: NSXMLDTD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSXMLDTD
      • From: Niels Meersschaert <email@hidden>
  • Prev by Date: Re: Path names in executable
  • Next by Date: Re: trying to add Growl support
  • Previous by thread: NSXMLDTD
  • Next by thread: Re: NSXMLDTD
  • Index(es):
    • Date
    • Thread