Hi,

Suppose I get the following data from the server:

<root>
  <data1>blablah</data1>
  <data2>...</data2>
  text message
</root>

" text message" is a text node that is at the same level as the other
data nodes in the hierarchy. Strangely, it does not seem to be
accessible.

Supposing the xml data is stored in xmlDoc:

xmlDoc.text() returns the data from all nodes concatenated; I just
want the single node that is a text node;
xmlDoc.children().length returns 2, as if the 3rd node did not exist;

Is there a way of extracting the text node shown above using jQuery
functions??

(of course, one can test if xmlDoc.lastChild.nodeType == 3 if one
knows that it is the last node in the document, but then one has to
extract the text using the text property with IE or the textContent
property with FF. But this is totally inelegant IMHO)

Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to