• 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: XML and NSCoder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML and NSCoder


  • Subject: Re: XML and NSCoder
  • From: Dirk Theisen <email@hidden>
  • Date: Tue, 27 Nov 2001 10:16:13 +0100 (Europe/Berlin)

Hi, Simon!

Is there any way to make NSCoder spit out XML? Failing that, is there
a general XML encoding & decoding thing for Objective-C? I've
starting writing my own "emitXML:(NSString *)" for generating XML and
using expat for reading it, but I can't help but thinking that ther
eis a better way.

There is Objective-XML by Marcel Weiher, which is roughly what you want.
The alternative is WOXMLCoding as implemented in WO5 (Java). I am not aware that they defined an objc protocol for that, but maybe we should. It looks like the Marcels work could be made compatible with an interface like the one below with reasonable effort.


Has anybody done work in this direction?

Regards,
Dirk

----------------------

encodeBooleanForKey
public void
encodeBooleanForKey (
boolean,
java.lang.String )


encodeDoubleForKey
public void
encodeDoubleForKey (
double,
java.lang.String )


encodeFloatForKey
public void
encodeFloatForKey (
float,
java.lang.String )


encodeIntForKey
public void
encodeIntForKey (
int,
java.lang.String )


encodeObjectForKey
public void
encodeObjectForKey (
java.lang.Object,
java.lang.String )


encodeRootObjectForKey
public synchronized java.lang.String
encodeRootObjectForKey (
java.lang.Object,
java.lang.String )

...and...

decodeBooleanForKey
public boolean
decodeBooleanForKey (
java.lang.String )


decodeDoubleForKey
public double
decodeDoubleForKey (
java.lang.String )


decodeFloatForKey
public float
decodeFloatForKey (
java.lang.String )


decodeIntForKey
public int
decodeIntForKey (
java.lang.String )


decodeObjectForKey
public java.lang.Object
decodeObjectForKey (
java.lang.String )


decodeRootObject
public synchronized java.lang.Object
decodeRootObject (
com.webobjects.foundation.NSData )


decodeRootObject
public synchronized java.lang.Object
decodeRootObject (
java.lang.String )


decodeRootObject
public synchronized java.lang.Object
decodeRootObject (
org.xml.sax.InputSource )


--

Dirk Theisen <email@hidden>
Diplominformatiker

Rvmerstr. 164, D-53117 Bonn (Germany)
Tel. +4922873-4504 (Fax: -4382)


  • Follow-Ups:
    • Re: XML and NSCoder
      • From: Finlay Dobbie <email@hidden>
References: 
 >XML and NSCoder (From: "Simson Garfinkel" <email@hidden>)

  • Prev by Date: Re: NSScanner problem
  • Next by Date: Re: drawing pixels in NSView
  • Previous by thread: XML and NSCoder
  • Next by thread: Re: XML and NSCoder
  • Index(es):
    • Date
    • Thread