2

Any client js libraries for turning XML into a JavaScript object? I'm specifically working with RSS and ATOM XML.

I don't want to go from XML to JSON then eval().

I'd like to go from XML directly to JavaScript hashes/arrays.

3 Answers 3

1

Try adobe's spry framework.

http://labs.adobe.com/technologies/spry/

they have a dataset object that does exactly this.

http://labs.adobe.com/technologies/spry/samples/

Lots of examples on how they turn xml into javascript datasets.

http://labs.adobe.com/technologies/spry/samples/data_region/XMLDataSetStringHandlingSample.html

Sign up to request clarification or add additional context in comments.

1 Comment

+1 thanks I'll have to look at this. Been years since I looked at this framework.
0

Have you looked at the Google AJAX Feed API?

I use it all the time and you don't need to register for am API key anymore

Comments

0

You can use Yahoo Pipes if the source of the XML is an online feed somewhere. This will gice you a JSON object that you can access like e.g. data[x].propertyName

Using eval() isn't madatory for processing JSON ;)

2 Comments

I know eval() isn't mandatory (just helpful). Very helpful if you consider all the browsers haven't implemented a native safe way to process JSON. I think that is coming soon, but I couldn't find any good links on it.
What I really want is something that loops over the XML DOM and produces a array/hashtable object and skips the JSON representation.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.