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

Re: XML to NSDictionary


  • Subject: Re: XML to NSDictionary
  • From: Marc Respass <email@hidden>
  • Date: Fri, 10 Nov 2006 13:25:17 -0500

Alex,

I've done this. The XML file that I convert is big and complex and the conversion is very fast (using xerces in Java or the XSL libs in Mac OS X). I'm a huge advocate of using XSLT to convert an XML doc to something useful. XML has this tendency to make people think it's a solution and then come up with the most outrageous and useless document. Use XSLT to convert it to something you can use :).

You can, if you don't know, convert to anything with XSLT so you might even convert to an old style ASCII plist. The XML plist is nice because you get data types (numbers, dates, booleans) but if you don't care then an ascii plist is easier to read and might be a bit easier to build.

Hope this help
Marc

On Nov 10, 2006, at 6:30 AM, Alexander Griekspoor wrote:

Hi,

I have an XML file that I want to convert to a nsdictionary for easy access/enumeration etc. instead of using XPath queries all the time to do lookups (this works but gets rather slow and seems expensive with large xml files). So I was playing with the following thought: would it perhaps be a good plan to do an XSLT operation on the xml document to at once convert it into apple's plist format and use that to instantiate an NSDictionary from? Has anyone ever tried something alike or could comment on whether this would be something smart to do?
Another thing to speed up parsing my xml file would be to use an xslt to remove all unwanted crap from the xml file, after which xpath queries will be much faster I guess? I don't like the xml parser as an alternative for the dom based approach because it gives you so much info to handle that I don't care about (but perhaps not after the xslt based removal of unwanted info that I was thinking about above). Any feedback is welcome.
Alex


***********************************
Mek (Alexander Griekspoor)
     MekenTosj.com
Web: http://www.mekentosj.com
Mail:  email@hidden
***********************************


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: XML to NSDictionary
      • From: Alexander Griekspoor <email@hidden>
References: 
 >XML to NSDictionary (From: Alexander Griekspoor <email@hidden>)

  • Prev by Date: Re: Spawning windows.
  • Next by Date: Re: Convert path format?
  • Previous by thread: Re: XML to NSDictionary
  • Next by thread: Re: XML to NSDictionary
  • Index(es):
    • Date
    • Thread