Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
</style>
</head>
<body>
</body>
</html>
 
var xml = '<soap:Envelope xmlns:xsi="http://www.w3.org\/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\
  <soap:Body>\
    <GetWorkPosResponse xmlns="http://localhost.com/apps">\
      <GetWorkPosResult>\
        <GetWorkPos>\
          <ProductId>string</ProductId>\
          <Product>string</Product>\
          <quantity>decimal</quantity>\
          <Em>string</Em>\
          <type>string</type>\
        </GetWorkPos>\
        <GetWorkPos>\
          <ProductId>string</ProductId>\
          <Product>string</Product>\
          <Quantity>decimal</Quantity>\
          <Em>string</Em>\
          <Type>string</Type>\
        </GetWorkPos>\
      </GetWorkPosResult>\
    </GetWorkPosResponse>\
  </soap:Body>\
</soap:Envelope>';
var myObj=new Array(); 
var index = 0;
$(document).ready(function(){
$(xml)
        .find('GetWorkPosResult').find('GetWorkPos')
        .each(function(){
            myObj[index] = $(this).text();
          index +=1;
        });
  
  for(var i =0; i< myObj.length;i++){
    $('body').append(myObj[i]+"<br/>");
  }
});
  
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers