Help to get NodeValue

I have an xml data which is as follows

<?xml version="1.0" ?>

- <page_data>

<template>home.htt</template>

<template_data />

- <content>

- <main>

- <![CDATA[

><div><span class="Heading2">Welcome to Immediacy</span></div>

<div>Immediacy is an e-business software provider specialising in

content managment solutions. We aim:</div>

<ul type="disc">

<li class="MsoNormal">To provide world class content management

solutions that are within financial reach of the vast majority of

businesses</li>

<li class="MsoNormal">To enable organizations to communicate

effectively by empowering individuals with the knowledge to take

part</li>

<li class="MsoNormal"><span lang="EN-US">To provide customers with

a competitive advantage by accelerating publishing and lowering

production costs</span></li>

</ul>

<p class="MsoNormal">?</p>

<hr color="#66cc66" size="2" />

]]>

</main>

- <HEAD>

- <![CDATA[

><script language="Javascript">

// User editable scripts

function userinit()

{

// Any user edited initialisation here

}

</script>

<!--USER EDITS GO HERE-->

]]>

</HEAD>

- <sidebar>

- <![CDATA[ ><DIV>?</DIV>

]]>

</sidebar>

</content>

</page_data>

after creating a Dom document when I get the child nodes...It does give me proper number...7

But when I check for a condition for nodename("template")

and try to get its Node Value...it gets the nodename value but It returns nodevalue as null.

Any idea How this can be overcome..

smita

[2032 byte] By [smitaunni] at [2007-9-26 2:29:15]
# 1
To get content's element, you have to call getNodeValue() but the next TEXT_NODE.ELEMENT_NODE -> <template>TEXT_NODE -> home.httHope this helps
R2D2 at 2007-6-29 9:46:11 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
hi smita could you tell me how do you extract the contents of the cdata Could you mail me the solution please my email is san_gomes@hotmail.comTIASanjay
san_gomes at 2007-6-29 9:46:11 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Hi! R2D2Thanks for ur Help....I am getting the node value using it as a text node...Thanxs again.smita
smitaunni at 2007-6-29 9:46:11 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...