I have the following problem. Im using Xpath to extract the value from XML file using JAVA program
<place>
<native name= "AAAAAA" />
<native name= "BBBBBB" />
<native name= "CCCCCC" />
<native name= "DDDDDD" />
<native name= "EEEEEE" />
</place>
Above is my partial XML file. Im using the following Xpath
/root/place/native/@name
/root/home
/root/xxxxxx
and i want my result to be like this
AAAAAA|BBBBBBB|CCCCCCC|DDDDDDD|EEEEEEEˆevergreenˆvaluesˆexample
How can i do this . Can any one help me
for (String temp : XpathValue) {
TempFlat = xPath1.compile(temp).evaluate(xmlDocument);
TempFlat1 = TempFlat.replaceAll("\\s+", " ");
value1.append(TempFlat1);
value1.append((char)"ˆ");