public class XPathExpression { DOM_Document XML_DOM; Array of Strings XPathLocationStepStringsArray; Array of XPathLocationSteps XPathLocationStepsArray; Array of Nodes ResultNodeSet; //constructor XPathExpression (string XMLFile, string XPathExpression) { XML_DOM = XMLFile loaded into a DOM; XPathLocationStepStringsArray = Tokenize XPath expression into smaller strings, where each string is a location step. Also unabbreviate any XPath abbreviations found; Integer locationStepCount = Number of location step strings in XPathLocationStepStringsArray; String IndividualXPathLocationStepString; XPathLocationStep IndividualXPathLocationStep; ResultNodeSet = XML_DOM; Repeat locationStepCount times from i = 0 to locationStepCount-1: { IndividualXPathLocationStepString = XPathLocationStepStringsArray[i]; IndividualXPathLocationStep = a new object of XPathLocationStep( IndividualXPathLocationStepString); ResultNodeSet = IndividualXPathLocationStep.getResult( ResultNodeSet); } }//constructor public Array of nodes getResult() { return ResultNodeSet; }//getResult }//class