Re: XML to NSDictionary
Re: XML to NSDictionary
- Subject: Re: XML to NSDictionary
- From: Robert Walker <email@hidden>
- Date: Fri, 10 Nov 2006 09:25:20 -0500
Alexander,
I do have some limited experience with XSLT and I believe that is
exactly what you should do. I was actually using XSLT to transform
WebObjects XML serialized enterprise objects (which also contains a
lot of extra data I didn't care about for the external system) into a
more generic XML format that could by used by any external system.
In my case the external system was a Cocoa application used to access
my WebObjects application through exposed web services.
I would recommend spending some time to learn the XSLT language.
It's actually quite powerful for transforming one XML format into
other formats (i.e. DOM, HTML, CSV, etc.)
A good place to start:
http://www.w3schools.com/xsl/
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:
40mac.com
This email sent to email@hidden
--
Robert Walker
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