On Wed, Jul 9, 2008 at 12:38 PM, Wallonman <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Some hours that I don't understand why this basic Xml parsing with
> JQuery doesn't work:
>
>            $(document).ready(function() {
>
>                var xml = '<?xml version="1.0" encoding="utf-8"?
>><root><p>Hello World!</p></root>';
>
>                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.
>
>



try alert($("p", xml).eq(0).text());
-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com

Reply via email to