Javascript element content without child elements CS3
Hi,
i have the following problem which i hope you guys can help me with.
i have create the following xml structure in idesign
<root>
<story>
<element1>
<subelement>this is some content in subelement</subelement>
this is some content in element1
</element1>
</story>
</root>
now i want to get with javascript the content of element1.
but then i use the following code
var xmlelement = some code to get element1
xmlelement.contents or xmlelement.xmlContent.contents
i get this text returned
this is some content in subelement
this is some content in element1
and not only this text
this is some content in element1
i want only the content from element1 and not element1 and all his sub elements