System and method for generating an XPath expression

Information

  • Patent Application
  • 20070208769
  • Publication Number
    20070208769
  • Date Filed
    March 03, 2006
    18 years ago
  • Date Published
    September 06, 2007
    17 years ago
Abstract
An XPath generation system generates a default XPath expression (XPath) from a selected destination node. The system provides to a user the default XPath with modification options. The system modifies the default XPath according to selected modification options to generate a resulting XPath. If none of the modifications options are selected, the system selects the default XPath as the resulting XPath. The modification options comprise selecting a different node as a destination node of the XPath, selecting a context node as a starting node of the XPath, selecting an axis for specifying a path between the context node and the destination node, specifying selection of a node by name or by type, specifying selection of any node, and specifying return of only unique values of the resulting XPath.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

The various features of the present invention and the manner of attaining them will be described in greater detail with reference to the following description, claims, and drawings, wherein reference numerals are reused, where appropriate, to indicate a correspondence between the referenced items, and wherein:



FIG. 1 is a schematic illustration of an exemplary operating environment in which an XPath generating system of the present invention can be used;



FIG. 2 is a block diagram of the high-level architecture of the XPath generating system of FIG. 1;



FIG. 3 is an exemplary screen shot of a tree representation of an XML document from which a user can select a node for use by the XPath generating system of FIGS. 1 and 2;



FIG. 4 is an exemplary screen shot of a user interface of the XPath generating system of FIGS. 1 and 2;



FIG. 5 is a process flow chart illustrating a method of operation of the XPath generating system of FIGS. 1 and 2;



FIG. 6 is a process flow chart illustrating a method of operation of the XPath generating system of FIGS. 1 and 2 in generating a default XPath; and



FIG. 7 is a process flow chart illustrating a method of operation of an embodiment of the XPath generating system of FIGS. 1 and 2 in providing input options for the user to generate a default XPath.


Claims
  • 1. A processor-implemented method of generating an XPath expression, the method comprising: generating a default XPath expression from a node in a tree, wherein the node is selected as a destination node of the XPath expression;providing the default XPath expression with a plurality of modification options for modifying the default XPath expression;wherein if at least one of the modification options is selected, modifying the default XPath expression according to the selected modification options to generate a resulting XPath expression; andwherein if none of the modifications options is selected, selecting the default XPath expression as the resulting XPath expression.
  • 2. The method of claim 1, wherein the resulting XPath expression is integrated into an XML query.
  • 3. The method of claim 1, wherein the tree represents an XML schema.
  • 4. The method of claim 1, wherein the tree represents a schema in a semi-structured language.
  • 5. The method of claim 1, further comprising selecting the modification options by selecting a different node as a destination node of the XPath expression.
  • 6. The method of claim 1, further comprising selecting the modification options by selecting a context node as a starting node of the XPath expression.
  • 7. The method of claim 1, further comprising selecting the modification options by selecting an axis for specifying a path between the context node and the destination node.
  • 8. The method of claim 1, further comprising selecting the modification options by specifying selection of a node by name.
  • 9. The method of claim 1, further comprising selecting the modification options by specifying selection of a node by type.
  • 10. The method of claim 1, further comprising selecting the modification options by specifying a selection of any node, and specifying a selection of distinct values to return unique values of the resulting XPath expression.
  • 11. A computer program product having a plurality of program codes that are stored on a computer-useable medium for generating an XPath expression, the computer program product comprising: a program code for generating a default XPath expression from a node in a tree, wherein the node is selected as a destination node of the XPath expression;a program code for providing the default XPath expression with a plurality of modification options for modifying the default XPath expression;wherein if at least one of the modification options is selected, a program code modifies the default XPath expression according to the selected modification options to generate a resulting XPath expression; andwherein if none of the modifications options is selected, a program code selects the default XPath expression as the resulting XPath expression.
  • 12. The computer program product of claim 11, wherein the resulting XPath expression is integrated into an XML query.
  • 13. The computer program product of claim 11, wherein the tree represents an XML schema.
  • 14. The computer program product of claim 11, wherein the tree represents a schema in a semi-structured language.
  • 15. The computer program product of claim 11, further comprising a program code for selecting the modification options by any one of: selecting a different node as a destination node of the XPath expression;selecting a context node as a starting node of the XPath expression;selecting an axis for specifying a path between the context node and the destination node;specifying selection of a node by name; andspecifying selection of a node by type.
  • 16. A processor-implemented system having a plurality of program codes that are stored on a computer-useable medium for generating an XPath expression, the system comprising: an Xpath engine for generating a default XPath expression from a node in a tree, wherein the node is selected as a destination node of the XPath expression;an XPath user interface controller for providing the default XPath expression with a plurality of modification options for modifying the default XPath expression;wherein if at least one of the modification options is selected, an XPath engine modifies the default XPath expression according to the selected modification options to generate a resulting XPath expression; andwherein if none of the modifications options is selected, the XPath engine selects the default XPath expression as the resulting XPath expression.
  • 17. The system of claim 11, wherein the resulting XPath expression is integrated into an XML query.
  • 18. The system of claim 11, wherein the tree represents an XML schema.
  • 19. The system of claim 11, wherein the tree represents a schema in a semi-structured language.
  • 20. The system of claim 11, wherein the XPath user interface controller selects the modification options by any one of: selecting a different node as a destination node of the XPath expression;selecting a context node as a starting node of the XPath expression;selecting an axis for specifying a path between the context node and the destination node;specifying selection of a node by name; andspecifying selection of a node by type.