Unable to evaluate Xpath xpression having [@xsi:type='ED'] type
XPathFactory xpathFactory = XPathFactory.newInstance();
XPath xpath = xpathFactory.newXPath(); String name = xpath.evaluate("/MCCI_IN200100UV01/PORR_IN049016UV[1]/controlActProcess[@classCode='CACT'][@moodCode='EVN']/subject[@typeCode='SUBJ'][1]/investigationEvent[@classCode='INVSTG'][@moodCode='EVN']/component[@typeCode='COMP'][adverseEventAssessment][1]/adverseEventAssessment[@classCode='INVSTG'][@moodCode='EVN']/subject1[@typeCode='SBJ'][1]/primaryRole[@classCode='INVSBJ']/subjectOf2[@typeCode='SBJ'][observation[id][code[@code='29'][@codeSystem='2.16.840.1.113883.3.989.2.1.1.19']]][1]/observation[@classCode='OBS'][@moodCode='EVN']/outboundRelationship2[@typeCode='PERT'][observation/code[@code='30'][@codeSystem='2.16.840.1.113883.3.989.2.1.1.19']][1]/observation[@classCode='OBS'][@moodCode='EVN']/value[@xsi:type='ED'][1]/text()",doc)
// doc is xml document parsed through build.parse();
Same expression is working after changing value[@xsi:type='ED'][1]/text() to value/text()
Sample xml content like this
<outboundRelationship2 typeCode="PERT">
<observation moodCode="EVN" classCode="OBS">
<code code="30" codeSystem="2.16.840.1.113883.3.989.2.1.1.19" codeSystemVersion="2.0" />
<value xsi:type="ED">myalgias, back</value>
</observation>
</outboundRelationship2>