Here is a simple solution I've been using for a while and recently released
as a plugin:
http://www.fyneworks.com/jquery/xml-to-json/

But there's also a SOAP client plugin which seems to be a more robust
solution...*
*
2008/8/23 Arun Kumar <[EMAIL PROTECTED]>

>
> No solutions?
>
> On Aug 17, 2:12 pm, Arun Kumar <[EMAIL PROTECTED]>
> wrote:
> > Have a look at the sample code given below:
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
> > TR/html4/strict.dtd">
> > <html>
> >         <head>
> >                 <meta http-equiv="Content-Type" content="text/html;
> > charset=iso-8859-1" />
> >                 <title>XML Parsing</title>
> >         </head>
> >         <body>
> >                 <script language="JavaScript" type="text/javascript"
> > src="jQuery.js"></script>
> >                 <script language="JavaScript" type="text/javascript">
> >                         var strXML = "<?xml version='1.0'?>" +
> >
>  "<bodyTag><search:totalResults>3</search:totalResults></
> > bodyTag>";
> >
> >                         if (document.implementation &&
> > document.implementation.createDocument)
> >                     {
> >                         objDocument =
> document.implementation.createDocument("", "",
> > null);
> >                     }
> >                     else if (typeof ActiveXObject != 'undefined')
> >                     {
> >                         try
> >                         {
> >                             objDocument = new
> ActiveXObject('Microsoft.XMLDOM');
> >                         }
> >                         catch (e)
> >                         {
> >                         }
> >                     }
> >
> >                         objDocument.load(strXML);
> >                         alert(objDocument);
> >                         alert($("bodyTag", objDocument).find("search\
> > \:totalResults").text());
> >
> >                 </script>
> >         </body>
> > </html>
> >
> > The above sample is tested in IE7, using jQuery 1.2.6
>



-- 
Cheers,
Diego A.

Reply via email to