0
minOccur = "1"인 노드를 선택하려는 XML이 있지만 모든 자식 노드에는 이러한 속성이 없습니다.XPATH : 특정 속성이있는 노드를 선택하고 자식 노드에 특정 속성이 없습니다.
내 XPATH :
//xnode[@type="parent" and @minOccurs="1" and ./child[not(@minOccurs)] and ./child[not(@or)] and ./not(ors) ]
XML : ID가 = "7"반환하지만 두 노드가 반환됩니다 밝혀졌다 : 만 두 번째 노드를 기대
<root>
<xnode type="parent" id="1" name="Date" maxOccurs="1" minOccurs="1">
<Othertags id="2" language="FR" name="Date"/>
<child id="3" name="dateone" maxOccurs="1" value="DONE">
<def id="4" language="EN" value="this is date one"/>
</child>
<child id="5" name="datetwo" maxOccurs="1" minOccurs="1" value="DTWO">
<def id="6" language="EN" value="this is date two"/>
</child>
</xnode>
<xnode type="parent" id="7" name="Time" maxOccurs="1" minOccurs="1">
<Othertags id="8" language="FR" name="time"/>
<child id="9" name="timeone" maxOccurs="1" value="TONE">
<def id="10" language="EN" value="this is time one"/>
</child>
<child id="11" name="timetwo" maxOccurs="1" value="TTWO">
<def id="12" language="EN" value="this is time two"/>
</child>
</xnode>
</root>
. XPath에 무엇이 잘못 되었습니까? 고마워,
예, 훌륭합니다! – dellair