0

Why text() returns empty string on MyPage.aspx ? .find and .filter do find "imagesPaths" node.

<script type="text/javascript" charset="utf-8">

function MyFunction(albumNb) 
{    
//xmlContent = "<images><imagePaths>2</imagePaths><imageTitles>title1,title2,title3, 
//title4</imageTitles></images>"

$.ajax({
    url: "MyPage.aspx?albumNb=1",
    type: 'GET',
    success: function (res) {
       var xmlContent = res.xml;             
       $imagePaths = $(xmlContent).find("imagePaths").text();  //returns empty string, Why? 
       //$imagePaths = $(xmlContent).filter("imagePaths").text(); //also returns empty string 

    }
 });

}

Thank you

crush
  • 16,713
  • 9
  • 59
  • 100
Karen Slon
  • 233
  • 1
  • 4
  • 16

0 Answers0