You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am learning XPATH for processing XML file. I want to find the value of ADDRESS via value of ID. I created several, but failed.
check_xpath = '/ABC/CDE/FHI[ID=Q11002]/ADDRESS/text()'
The result is always empty.
Where am I incorrect?
The text was updated successfully, but these errors were encountered:
<?xml version="1.0" encoding="utf-8"?> <ABC> <CDE> <FHI> <ADDRESS INTERVAL-TYPE="CLOSED">1</ADDRESS> <ACK INTERVAL-TYPE="CLOSED">1</ACK> <JKL> <ID TI="abc">Q11001</ID> </JKL> </FHI> <FHI> <ADDRESS INTERVAL-TYPE="CLOSED">2</ADDRESS> <ACK INTERVAL-TYPE="CLOSED">2</ACK> <JKL> <ID TI="def">Q11002</ID> </JKL> </FHI> <FHI> <ADDRESS INTERVAL-TYPE="CLOSED">3</ADDRESS> <ACK INTERVAL-TYPE="CLOSED">3</ACK> <JKL> <ID TI="ghi">Q11003</ID> </JKL> </FHI> </CDE> </ABC>
I am learning XPATH for processing XML file. I want to find the value of ADDRESS via value of ID. I created several, but failed.
check_xpath = '/ABC/CDE/FHI[ID=Q11002]/ADDRESS/text()'
The result is always empty.
Where am I incorrect?
The text was updated successfully, but these errors were encountered: