[thelist] XML DOM question (possibly a silly one, possibly not)

Andrew Clover and-evolt at doxdesk.com
Thu Jul 7 10:17:52 CDT 2005


Paul Cowan <evolt at funkwit.com> wrote:

> Is there an easy way to do this?

In DOM Level 3 Core there is a 'textContent' property which will do this 
for you. However this is relatively new and Level 3 is not yet supported 
by any released version of MSXML.

There does also seem to be a MS-only property 'text' which does more or 
less the same thing:

 
http://msdn.microsoft.com/library/en-us/xmlsdk/html/b9f053cf-84cf-4a1c-9d7e-b3aabf9830a2.asp

> He can obviously do a loop through the 
> child nodes of mynode, check if they're type TEXT_NODE or 
> CDATA_SECTION_NODE

That's the normal way of doing it if you can't rely on either of the 
above being available.

-- 
Andrew Clover
mailto:and at doxdesk.com
http://www.doxdesk.com/


More information about the thelist mailing list