Example 12 Previous Next |
/descendant::* |
---|
Select all descendats of document root and therefore all elements |
<AAA> <BBB> <DDD> <CCC> <DDD/> <EEE/> </CCC> </DDD> </BBB> <CCC> <DDD> <EEE> <DDD> <FFF/> </DDD> </EEE> </DDD> </CCC> </AAA> |
Open the example in XLab. | Tree view (PNG) |
/AAA/BBB/descendant::* |
---|
Select all descendats of /AAA/BBB |
<AAA> <BBB> <DDD> <CCC> <DDD/> <EEE/> </CCC> </DDD> </BBB> <CCC> <DDD> <EEE> <DDD> <FFF/> </DDD> </EEE> </DDD> </CCC> </AAA> |
Open the example in XLab. | Tree view (PNG) |
//CCC/descendant::* |
---|
Select all elements which have CCC among its ancestors |
<AAA> <BBB> <DDD> <CCC> <DDD/> <EEE/> </CCC> </DDD> </BBB> <CCC> <DDD> <EEE> <DDD> <FFF/> </DDD> </EEE> </DDD> </CCC> </AAA> |
Open the example in XLab. | Tree view (PNG) |
//CCC/descendant::DDD |
---|
Select elements DDD which have CCC among its ancestors |
<AAA> <BBB> <DDD> <CCC> <DDD/> <EEE/> </CCC> </DDD> </BBB> <CCC> <DDD> <EEE> <DDD> <FFF/> </DDD> </EEE> </DDD> </CCC> </AAA> |
Open the example in XLab. | Tree view (PNG) |