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

XML and NSDictionary


  • Subject: XML and NSDictionary
  • From: Lionel GUILLAUME <email@hidden>
  • Date: Tue, 11 May 2004 11:21:26 +0200

Hi,

I am writting a web interface with WO to manage the postfix mail server
include with MacOSX Server.

The apple mail server use the a xml ldap attribute to manage mailbox :

<?xml version="1.0" encoding="UTF-8"?>
<dict>
    <key>kAPOPRequired</key>
    <string>APOPNotRequired</string>
    <key>kAltMailStoreLoc</key>
    <string></string>
    <key>kAttributeVersion</key>
    <string>Apple Mail 1.0</string>
    <key>kAutoForwardValue</key>
    <string></string>
    <key>kIMAPLoginState</key>
    <string>IMAPAllowed</string>
    <key>kMailAccountLocation</key>
    <string>192.168.0.6</string>
    <key>kMailAccountState</key>
    <string>Enabled</string>
    <key>kPOP3LoginState</key>
    <string>POP3Allowed</string>
    <key>kUserDiskQuota</key>
    <string>0</string>
</dict>

I use the following syntax to parse it an create a NSDictionay :
NSDictionary dict =
NSPropertyListSerialization.dictionaryForString((String)a.storedValueForKey("mailOption"));
NSMutableDictionary mDict = new NSMutableDictionary (dict);
mDict.setObjectForKey ("kUserDiskQuota", "100");

So I can modify the NSMutableDictionary as I want, but I don't hnow how
to transform it to XML
after modifications.

I tried the stringFromPropertyList(Object plist) method but the String
result is not XML.
I think I should use the dataFromPropertyList(Object object,
String encoding) method but the String result is not XML because the
encoding is not set properly.

Does someone have an idea ?


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


  • Follow-Ups:
    • Re: XML and NSDictionary
      • From: Jean-François GUILLAUD <email@hidden>
  • Prev by Date: Re: wofileupload with postgrest+hexdream
  • Next by Date: WOToOneRelationship default value
  • Previous by thread: Re: AppleScript from WO
  • Next by thread: Re: XML and NSDictionary
  • Index(es):
    • Date
    • Thread