I would like to parse an XML that is stored in the database as a text.

Here is an example of how I encode/decode objects using XML:

public WOComponent encodeObjects(NSArray objects) {
WOXMLCoder coder = WOXMLCoder.coder();
String xml = coder.encodeRootObjectForKey(objects, "MyObjects");
return objects;
}

public NSArray decodeObjects(NSData xmlData) {
WOXMLDecoder decoder = WOXMLDecoder.decoder();
NSArray objects = (NSArray)decoder.decodeRootObject(xmlData);
return objects;
}

If you need to encode custom classes, which are not supported by the default coder/decoder, you will need to implement WOXMLCoding interface in your custom classes.  There is a nice example of how to do this in the documentation for WOXMLCoding.

On Nov 3, 2005, at 7:41 AM, .::welemski::. wrote:

Hi,

does anyone knows a very good tutorials on using XML with WebObjects?

I would like to parse an XML that is stored in the database as a text.
I would like to use the NSKeyValuCoding feature of XML.

Thanks

--
 -- -- -- -- -- -- -- -- -- -- --
          welemski
 -- -- -- -- -- -- --
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to