Re: Writing (not reading) XML
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.