[jQuery] Re: Parsing XML using jQuery
It seems that the DOM parsed 'on the fly' isn't ready for querying. When doing something weird like: var xml = $('Hello World!Bye World!'); $(xml).appendTo("body"); then the alert($("p").text()); // without context works !
[jQuery] Parsing XML using jQuery
Hi, Some hours that I don't understand why this basic Xml parsing with JQuery doesn't work: $(document).ready(function() { var xml = 'Hello World!'; alert($("p", xml).text()); }); I get an empty string, instead of the expected Hello World! I had a look to a similar previous post http://groups.google.com/group/jquery-en/browse_thread/thread/fc60b77f884e6866/85cbd666774c6780) , but this didn't help me to get the revelation.