This method is used, iteratively, to cause the creation of a given XPath set of ODOM nodes where nodes in the XPath are missing.
Each step in processing the XPath simply takes the first component of the XPath (i.e. up to a '/' or the end of the string) and creates a sub-XPath from it. This is used to access the required node.
If not found, that sub-node is created. This could be an optionally predicated element, an attribute or an optionally predicated text node. The predicate can simply be removed before processing the remainder of the path (the required number of new instances must be created to ensure that the required predicated instance will exist).
Note: The path is for an attribute if it starts with the '@' character, a text node if it is the value "text()" and otherwise is for a named element.
@param context the ODOMElement that serves as the context ('parent'node).
@param factory the ODOMFactory that will be used to create a Text,Attribute or Element node.
@return the lowest node created in the path.
@throws IllegalArgumentException if context is null or factory is null.
@throws IllegalStateException if an attempt was made to create a nodeof an unsupported type.
@throws com.volantis.mcs.xml.xpath.XPathException if the XPath cannot be applied usingthe given context (the XPath is absolute and the context element doesn't match the root step in the path) or if the XPath is erroneous (e.g. contains path steps after an attribute or text node step).