Click to See Complete Forum and Search --> : text nodes


ShakyMobo
02-24-2005, 06:26 AM
I want to extract parts of some textnodes

test.xml
<text>How are you?</text>

test2.xml
<text>Not good</text>

I've been looking at xpointer to do the work but can't quite grasp the
consept.
Let's say you want to show the text "are" from test.xml and just "ot" from
test2.xml what would be the best way to do that?
I want to transform the result to a new xml file.
Any suggestions?

Khalid Ali
02-24-2005, 03:19 PM
you may want to visit w3c.org/Style/XSL/ (http://w3c.org/Style/XSL/)

If you are doing all that on server side then any programming language that allows to read xml files should let you parse a node and capture the text node value.

and if that doesn't help then you can use some javascript for string parsing once you have xml doc loaded in a page.