JSFiddle - React, Tailwind, and code Playground
by JAAulde
JavaScript
$.ajax( {
url: '/echo/xml/',
data: {
xml: '<root rootAttr="I am root > rootAttr!"><sub subAttr="I am sub > SubAttr a">SUB TEXT</sub></root>',
delay: 1
},
type: 'post',
dataType: 'xml',
success: function( doc )
{
alert( $( doc.documentElement ).attr( 'rootAttr' ) );
alert( $( doc ).find( 'sub' ).attr( 'subAttr' ) );
}
} );