Is it possible to extract specific data from a table that is formed by XMLSchema?

23 Views Asked by At

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?

1

There are 1 best solutions below

2
BrettC On

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.