• 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: Writing (not reading) XML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing (not reading) XML


  • Subject: Re: Writing (not reading) XML
  • From: Chris Parker <email@hidden>
  • Date: Tue, 23 Jul 2002 14:57:39 -0700

Hi Matthew,

On Tuesday, July 23, 2002, at 02:32 PM, Matthew Roberts wrote:

I've been looking at the XML Parser in CoreFoundations, but it looks like
it's mostly oriented towards reading XML from an existing source. Is this
still a class I can use for XML-creation purposes (perhaps by manually
creating the tree structure from my document's data). If so, how do I go
about storing the XML to disk (e.g. Converting to an NSData type).

You're right about manually creating the tree structure from your document's data - you're probably looking for the CFXMLNodeCreateXXX functions, and then the CFXMLTreeCreateXMLData function, which returns a CFDataRef containing the XML to write out.

CFData and NSData are toll-free bridged, so you should be able to just take that and send it out to disk with NSData's writeToFile:atomically: method.

Hope this helps,

.chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Writing (not reading) XML (From: Matthew Roberts <email@hidden>)

  • Prev by Date: Invalidating Rects for redraw
  • Next by Date: ObjectAlloc & MallocDebug crashes solved
  • Previous by thread: Writing (not reading) XML
  • Next by thread: Re: Writing (not reading) XML
  • Index(es):
    • Date
    • Thread