****************************** * A - All punctuation marks * ****************************** XPath expression: //c/text() Response from xmllint: / > cat //c/text() ------- , ------- ! ------- . ------- . ************************ * B - All substantives * ************************ XPath expression: //w[@pos="SUBST"]/text() Response from xmllint: / > cat //w[@pos="SUBST"]/text() ------- face ------- soul ------- time ------- space ------- poet *************************************************************** * C - All words in sentences that contain an exclamation mark * *************************************************************** XPath expression: //s[c="!"]/w/text() Response from xmllint: / > cat //s[c="!"]/w/text() ------- Since ------- I ------- can ------- never ------- see ------- your ------- face ------- I ------- send ------- my ------- soul ------- through ------- time ------- and ------- space ------- to ------- greet ------- you ********************************************************************** * D - All substantives in sentences that contain an exclamation mark * ********************************************************************** XPath expression: //s[c="!"]/w[@pos = "SUBST"]/text() Response from xmllint: / > cat //s[c="!"]/w[@pos = "SUBST"]/text() ------- face ------- soul ------- time ------- space ********************************************************************* * E - All punctuation marks of sentences that contain the word face * ********************************************************************* XPath expression: //s[w = "face"]/c/text() Response from xmllint: / > cat //s[w = "face"]/c/text() ------- , ------- ! *********************************************************************