1

I need to parse the directory listing of an external webpage in AngularJS. I found a few solutions to this problem, but those are in PHP. Is there anyway I can do it in angularjs?

I am making a $http.get call to get the html. I want to parse the html and convert into a json or xml. The structure of the html is as shown below

<head>
</head>

<body>
    <table>
        <tbody>
           <tr>
               <th> <img src = "abc.jpg"></th>
               ....
           </tr>
        </tbody>
    <table> 
</body>
akashrajkn
  • 2,295
  • 2
  • 21
  • 47

1 Answers1

1

$http.get will give you the HTML content of the remote page. Parsing it has nothing to do with Angular. See this answer for solutions, as HTML is a form of XML.

Once you have built your JSON structure, Angular can nicely display it.

Community
  • 1
  • 1
Mart
  • 5,608
  • 3
  • 32
  • 45