I have a Word 2003 XML document that I am trying to search for certain elements in. I have been able to do simple XPath queries to find single elements, but I am having difficulty coming up with a query to search between two elements:
<w:r>
<w:fldChar w:fldCharType="begin"/>
</w:r>
<w:r>
<w:instrText> DOCPROPERTY EvidenceBase * MERGEFORMAT </w:instrText>
</w:r>
<w:r>
<w:fldChar w:fldCharType="separate"/>
</w:r>
<w:r>
<w:t>EvidenceBase</w:t>
</w:r>
<w:r>
<w:fldChar w:fldCharType="end"/>
</w:r>
I am searching for the above XML, that has a w:r with a w:fldChar in it which has an attribute of w:fldCharType with value of "begin". It should return every element until it hits a w:r with a w:fldChar in it which has an attribute of w:fldCharType with value of "end".
Is this possible?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…