axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Myers <tommy...@dreamscape.com>
Subject Re: Mozilla Success, But a New Problem....
Date Fri, 06 Dec 2002 19:49:03 GMT


Roy Wood wrote:

> >  new XMLSerializer().serializeToString(node);
>
>
> Whoa-- using this I actually get back the text I really want, which is
> not at all what I expected.  I thought I'd get an XML representation of
> the node.

Whoa indeed. Am I confused, or...confused? wait a second...so what you
have is, umm, say

   var nodes = soapResponse.message.getElementsByTagName("item");
   var ser=new XMLSerializer();
   var res="";
   for (var i = 0;i < nodes.length;i++) {
      res+= ser.serializeToString(nodes[i]);
      }
   alert(res);

and the result does not contain the "<item..>" tags? This I don't get.
Can you try

   var nodes = soapResponse.message.getElementsByTagName("item");
   var ser=new XMLSerializer();
   var res="";
   for (var i = 0;i < nodes.length;i++) {
      var node=nodes[i];
      res+= node.nodeName+":"+node.nodeType+":"+node.nodeValue+":"+ser.serializeToString(node)+"\n";
      }
   alert(res);

puzzled,puzzled,puzzled.
Tom Myers



Mime
View raw message