0

I would like to extract data inside a webpage. The data is formed with http://w3.org/2001/XMLSchema .

The data that will be extracted is located in different <td> tags in a table. The table is automatically formed when the text is pasted to the <textarea>.

How can I extract specific parts of the text from these <td> tags?

Jordi Castilla
  • 26,609
  • 8
  • 70
  • 109

1 Answers1

0

I've had success parsing XML docs using the code after pulling it from an ajax request:

var putData; // where the selected tags name will be put
  $(xmlDoc).find('tagName').each(function(){// search within each <tagname> element
   putData = $(this).find('embeddedTagName').text();// pull the data out from the <embeddedTagName> within <tagName>
  });

This will search for the tag named <tagName> and search within it for <embeddedTagName> to give the included text. This will be done for each <tagName> element.

If there are a multitude of tags you will be searching within, I would suggest using an array or object to organize your pulled data.

BrettC
  • 71
  • 8