Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

You can specify an xml datatype in your get request. The data object will then be the XML root element:

$.get('PathToLocalXmlThatIUsedPhpToDownload', function(data) {
   //work with xml here
}, 'xml');

It's probably more efficient to work with the XML directly, rather than converting it to a javascript object and then working with the data. However, if it makes more sense in the context of your problem to use a javascript object, see the answer to this post: Tool (javascript) to convert a XML string to JSONTool (javascript) to convert a XML string to JSON

http://api.jquery.com/jQuery.get/

You can specify an xml datatype in your get request. The data object will then be the XML root element:

$.get('PathToLocalXmlThatIUsedPhpToDownload', function(data) {
   //work with xml here
}, 'xml');

It's probably more efficient to work with the XML directly, rather than converting it to a javascript object and then working with the data. However, if it makes more sense in the context of your problem to use a javascript object, see the answer to this post: Tool (javascript) to convert a XML string to JSON

http://api.jquery.com/jQuery.get/

You can specify an xml datatype in your get request. The data object will then be the XML root element:

$.get('PathToLocalXmlThatIUsedPhpToDownload', function(data) {
   //work with xml here
}, 'xml');

It's probably more efficient to work with the XML directly, rather than converting it to a javascript object and then working with the data. However, if it makes more sense in the context of your problem to use a javascript object, see the answer to this post: Tool (javascript) to convert a XML string to JSON

http://api.jquery.com/jQuery.get/

Source Link
colestrode
  • 10.7k
  • 3
  • 32
  • 43

You can specify an xml datatype in your get request. The data object will then be the XML root element:

$.get('PathToLocalXmlThatIUsedPhpToDownload', function(data) {
   //work with xml here
}, 'xml');

It's probably more efficient to work with the XML directly, rather than converting it to a javascript object and then working with the data. However, if it makes more sense in the context of your problem to use a javascript object, see the answer to this post: Tool (javascript) to convert a XML string to JSON

http://api.jquery.com/jQuery.get/