views:

32

answers:

1

i want to manipulate xml data simple ..

thanks

A: 

You can wrap it in a jQuery element, like this:

var xml = "<thing><child>test</child></thing>";

var text = $(xml).find('child').text();
alert(text); //"test"

You can use most of the jQuery traversal methods to find what you want in the string...I'm not 100% positive, but this sounds like what you want. This is a simple example for illustration purposes, but you can find more complex tutorials, like this and this if you needs to dig a bit deeper...if you know jQuery and it's traversal/selector methods though, it should be pretty intuitive.

Nick Craver
thanks very much
zjm1126