REDUCING PROGRAMMING COMPLEXITY IN APPLICATIONS INTERFACING WITH PARSERS FOR DATA ELEMENTS REPRESENTED ACCORDING TO A MARKUP LANGUAGE
According to an aspect of the present invention, a parser provides the portion identifiers (e.g., Xpath(s) in case of XML data files) of at It some of the data elements to the applications. As a result, the applications may be relieved from the task of computing the XPath(s) for various data elements. The implementation of applications may be simplified as a result. In one embodiment, prior API (application programming interface) is extended to provide the XPath(s). In an alternative embodiment, custom API is provided to encode the applications to obtain the XPath(s).
Latest Oracle Patents:
- TRACING USING CONFIGURABLE REFLECTION CHAINING
- USER INTERFACES FOR CLOUD LIFECYCLE MANAGEMENT
- GRAPHQL FILTER DESIGN FOR A GRAPHQL APPLICATION PROGRAMING INTERFACE (API) SCHEMA
- MULTIPLE TOP-OF-RACK (TOR) SWITCHES CONNECTED TO A NETWORK VIRTUALIZATION DEVICE
- MULTI-TIER DEPLOYMENT ARCHITECTURE FOR DISTRIBUTED EDGE DEVICES
1. Field of the Invention
The present invention relates to applications programming environment using markup languages such as XML, and more specifically to reducing programming complexity in applications interfacing with parsers for data elements represented according to a markup languages.
2. Related Art
Markup languages such as XML are generally used to represent various data of interest. A typical markup language generally contains tags which indicate one or more of various aspects such as what the data represents or how the data is to be displayed, etc. For example, in XML, relevant data is enclosed between a start tag and an end tag, indicating what the enclosed data represents. The relevant data and the tags are referred to as data elements in the present application.
Applications, which require data represented according to markup languages, often interface with a parser for the various data elements of interest. In a typical scenario, the XML data is stored in an XML data file, and the parser retrieves the data elements and provides the retrieved elements to the applications according to a prespecified approach.
According to one pre-specified approach often referred to as ‘pull parsing’, an application generally requests that the ‘next’ data element be provided. In response, a parser retrieves (e.g., from an XML document) the next data element (in sequential order) from the XML data file and provides the next data element to the application. Since the data elements are generally retrieved in sequential order, the parsers are referred to as sequential parsers.
According to another sequential parsing approach, often referred to as ‘push parsing’, a parser retrieves data elements in an XML data file without necessarily receiving a request for a next data element, and “pushes” the retrieved data element to the application (after the application has specified the file identifier of the XML data file). The applications are designed to process such data elements received from the push-based parsers. SAX and XNI are the two industry standards, which support push parsing.
The pull and push based parses are broody referred to as event based parsers since the requests (from application) of pull parsing and the pushing of data elements in push parsing can be viewed as events. It may be appreciated that the data elements are provided one at a time in event based parsing techniques.
In another broad prior approach, commonly referred to as ‘Object based parsing’ , the parser generally creates a hierarchical representation of data elements in an XML data file while parsing the XML data file and saves the hierarchical representation (in the form of a data structure) of the data elements into a random access memory (RAM) which is accessible to the application. The memory resident data structure is referred to as DC (Document Object Model). The object based parsers return the DOM to the application, typically after parsing of the XML data file is complete. Thus, the applications are designed to access the RAM for many desired data element thereafter. Two commonly used DOM standards are W3C DOM and J-DOM.
An advantage of the object based parsing over the event parsers is that the data elements are available quickly to the applications. However, the memory (RAM) requirements ore substantially more since a data structure representing the entire XML data file may be saved in the RAM.
Applications often requirement identifier (“portion identifier”) of portions (containing one or more data elements) of a data file. In the case of XML, the portion identifier is referred to as an XPATH, and is defined in a hierarchical fashion similar to the file paths in various computer systems. The portion identifier may be required, for example, to determine a parent/ancestor of a data element. As an illustration, assuming that an XML data file contains data related to a school and that a retrieved data element corresponds to the name of a student of a section, and it is desirable to determine the teacher of the section. The name of the teacher may be structured as an ancestor of the retrieved data element, and accordingly it may be described for an application to have the XPath of the name of the student.
In a prior approach, applications may include program logic to build/construct XPath (or portion identifier, in general) of such desired parts of an XML data file. The need to build such portion identifiers of data elements of interest generally adds to the programming complexity of applications. At least for such a reason, there is a general need to reduce programming complexity in applications interfacing with parsers for data elements represented according to markup languages.
BRIEF DESCRIPTION OF THE DRAWINGSThe present invention will be described with reference to the accompanying drawings briefly described below.
FIG. (FIG.) 1 is a block diagram illustrating the details of a general approach using which various aspects of the present invention are implemented in one embodiment.
In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.
DETAILED DESCRIPTION1. Overview
In an embodiment of the present invention, a parser provided determines identifiers (“portion identifiers”) of at least some portions of XML data provided to an application, and makes the portion identifiers available to the application. As a result, the application may not need to construct the portion identifiers of various portions of the XML data of interest, and the programming complexity of applications can be reduced as a result.
In the case of event-based parsers, the portion identifiers can be provided along with the data elements as parameters of a single procedure call. In the case of object-based parsers, the portion identifiers con be made available in the data structures (random access memory) from which applications typically access the data elements. In alternative embodiments, additional procedure calls (often referred to as function calls) can be used to provide the portion identifiers, as described below with examples.
A parser may construct the portion identifiers while parsing the XML data files. By constructing the portion identifiers while parsing the data files, the implementation of parsers also can be simplified.
Several aspects of the invention are described below with reference to examples for illustration. It should be understood that numerous specified details, relationships, methods are set forth to provide a full understanding of the invention. One skilled in the relevant art, however, will readily recognize that the invention can be practiced without one or more of the specified details, or with other method, etc. In other instances, well-known structures or operations are not shown in detail to avoid obscuring the invention.
2. Example Environment
Various example embodiments described above may be implemented on workstations/servers/systems available from vendors such as Sun Microsystems, IBM, and Dell supporting the JAVA application environment. Java concepts are described in further detail in a book entitled, “Java™: The Complete Reference, Fifth Edition” by Herbet Schildt, ISBN Number: 0-07-049543-2.
Application 110 generally needs to be implemented consistent with the interface (shown as 112) provided by parser 130. Parser 130 can be implemented by modifying many of the parsers (e.g., the event-based and object based parsers noted above in the background section) available in the marketplace to implement various aspects of the present invention. Alternatively, custom API (application programming interface) racy be defined to suitably provide the XPaths associated with various data elements.
Some example interfaces (shown as path 112) between applications and parsers, and the manner in which the interfaces can be implemented is described below with examples. First, the manner in which parser 130 and application 110 operate according to several aspects of the present invention is described below first.
3. Operation of Parser
In step 210, parser 130 may receive the identifier (“file identifier” to distinguish from the portion identifiers of portions data file) of an XML data file from an application. It should be appreciated that the file represents any data source (whether or not stored in secondary medium) and the file identifier identifies the data source.
In the example environment of
In step 220, parser 130 retrieves a data element from the XML data file. In general, the retrieved need to be consistent with the medium and access mechanism by which the data in the XML data file can be accessed, and the retrieved may be performed in a known way.
In step 230, parser 130 determines Xpath expression of the data element. In an embedment, the loop of steps 220-250 is executed for each data element in the XML data file. The data elements are retrieved sequentially from the XML data file, and the XPath may be computed as each data element is retrieved. The content of the XML data file can be used in determining the Xpath expression. The Xpath expression can also be computed in a known way.
Continuing with
In yet another approach described below, parser 130 provides XPath of each data element using API procedure calls defined according to various aspects of the present invention. In the case of data elements having data values, the data value is contained in the provided XPath. Each of the approaches is described in further detail below.
In step 250, a determination may be made as to whether there are additional data elements to be provided to the application. Control passes to step 220 if such additional data elements are present, and to step 299 otherwise. The flow chart of
4. Operation of an Application
In step 310, application 110 instructs a parser to parse an XML data file of interest. With reference to
In step 325, application 110 obtains XPath expression associated with an element from the parser. In embodiments described below, the XPath expression is obtained with respect to at least all the data elements, which have corresponding data values. However, alternative embodiments can be implemented in which XPath expressions are obtained in association with only some of the data elements of interest (e.g., by having the applications indicate such data elements of interest).
In step 330, application 110 may process the data element and XPath expression obtained from the parser. Such processing generally depend on the ‘business logic’ sought to be implemented by application 110. The XPath expression may be conveniently used to simplify the implementation of such business logic
In step 340, application 110 determines if there are more elements to be obtained from XML data file. Control passes to step 325 if there are more elements to be obtained, and otherwise control passes to step 399, in which the flow chart ends. It may be appreciated that the implementation of applications can be simplified due to the availability of XPath. The description is continued with reference to an example illustrating the various XPaths provided to an application in the context of an example data file.
5. XPaths for an Example XML Data File
Lines 422-425 contain XPaths for the corresponding four data elements of lines 403-406 respectively. Similarly, lines 426-429 and 430-433 represent XPaths for the data elements of lines 407-410 and 411-414 respectively. An XPath/books/book would represents the data portion corresponding to all the three book elements.
It may be appreciated that the XPaths thus generated can be made available to applications using different interfaces, as described below. The description is continued with reference to an approach in which the interfaces provided by some prior parsers can be extended to provide the XPath expressions.
6. Extensions to DOM Parsers
As noted above, DOM parser represents an object-based parser. DOM parser provides a pre-specified interface using which applications can obtain data elements from a data file of interest. DOM parser is described in a document entitled, “Effective XML” by Elliot Rusty Harold, available from Addison-Wesley Professional, ISBN: 0321 504 06 The manner in which such a parser can be modified is illustrated below with reference to
Lines 501, 505 and 507 are respectively shown importing the classes in a java application code, available in java.xml.parsers.*,org.w3c.dom.*, and java.util.Vector respectively. The package org.w3c.doc contains functions for accessing (traversing, modifying, creating) a (data structure) DOM according to W3C standards.
Line 508 defines class DOM parsing as being public, and the corresponding body (of the class) is contained in lines 511-528, as shown. Line 509 defines a variable ‘xpaths’ as a vector. The xpaths variable is then used to store XPath, as described below.
Line 511 causes the execution of the code corresponding to lines 513-526 to be executed. Line 513 initiates a new instance of the DOM parser, and the code corresponding handle is saved in variable dbf. In line 517, the factory instantiates the underlying registered DOM parser, and returns the pointer of the DOM parser class.
Line 520 specifies the file identifier of the XML data file to be parsed. Thus, the code of lines 513, 517 and 520 together perform the necessary initializations and completing instructing the DOM parser to parse a data file of interest.
In response, DOM parser provided/modified according to an aspect of the present invention poses the specified XML data file and load a data structure in the memory, with the data structure containing both the data elements and the corresponding XPaths. A pointer to the data structure is returned to the application.
The data structure mac be designed to store the corresponding XPaths as well. Any convention can be used to store the XPaths, and applications need to be designed consistently. An example convention is described below with reference to lines 522 and 524.
Line 522 calls procedure traverse( ), and the corresponding code is provided in
In lines 550-590, the parser traverses through each node in the DOM data structure and computes corresponding XPath expressions. As may be appreciated, there are various types of nodes in a DOM tree. The Node.DOCUMENT_NODE is the hook node from which the entire DOM tree follows. Node.ELEMENT_NODE represents an element tag. For example, for the XML portion <solution>hello</solution>, a node of the type ELEMENT_NODE would be created in the DOM tree for the tag solution, and a node of the type TEXT_NODE would be selected for the value hello. Line 571 would be executed when the current node is of type ELEMENT_NODE. At line 572, all the immediate children of the current node is added in NodeList. Lines 581-583 recursively call the method traverse for every node collected in the NodeList.
Thus, using techniques such as those described above, XPath can be provided to applications in the context of DOM-type parsers. The description is continued with an illustration of pseudo-code implementation of an interface between an application and an event-based push parser according to the present invention.
7. Extensions to Event-Based Push Parser
Lines 601, 603, 605 and 606 are respectively shown importing the classes available in source files java.xml.parsers.*,org.xml.sax.*,org.xml.sax.helpers.* and java.util.Vector.* respectively. Once imported, the classes in the source files can be referred to directly in the application ace.
Line 607 defines class SAXParsingXPath2 as being pubic, and the corresponding body (of the class) is contained in lines 609-645, as shown. Class SAXParsingXPath2 represents an implementation of SAX Parser according to an aspect of the present invention which returns XPath corresponding to each data element as a parameter. It may be appreciated that the procedure may return Xpath in addition to the attributes and values of the data element.
Line 615 initiates the execution of class SAXParsingXPath2 corresponding to lines 609-645. Line 609 causes execution of the code corresponding to lines 611-620. Line 611 initiates a new instance of the SAX Parser-Factory, and the corresponding handle is saved in variable spf.
Line 613 initiates a new instance of the SAX parser and the corresponding handle is saved in variable sp. Line 615 creates a handle (saved in variable handler) while executing the ace corresponding to the class SAXParsingXPath2.
Line 616 specifies the file identifier of the XML data file to be parsed. Since the application is assumed to be interfacing with a push parser, the parsing operations begin in response to execution of line 616, and the data elements of the specified data file (here . . . /something.xml”) are made available. Lines 617-620 are shown printing the XPpath for each data element, even though more complex business logic can process the XPaths.
Lines 621-627, 629-635 and 637-643 represent classes which obtain the XPaths provided by SAX parser according to various aspects of the present invention, add the XPaths to the variable vendor (as indicated by lines 625 and 633), and process the corresponding attributes and XPath. As may be readily observed, XPath corresponding to a data element is shown obtained as a parameter value each of lines 621, 629 and 637.
Accordingly, the SAX parser may need to be implemented to construct the XPath while parsing the XML data file, and provide the XPath value a parameter with each class. The description is continued with an illustration of pseudo-code implementation of an interface between an application and an event-based pull parser in an embodiment of the present invention.
8. Extensions to Event-Based Pull Parser
Lines 701, 702, 703, and 704 are respectively shown importing the classes available in source files java.io.*,javax.xml.stream.*,javax.xml.stream.events.*,java.util.Vector.*. Once imported, the classes in the source files can be referred to directly in the application code.
Line 705 defines class PullParsingXPath as being public, and the corresponding body (of the class) is contained in lines 705-735, as shown. Class PullParsingXPath represents an implementation of event based PULL Parser according to an aspect of the present invention which returns XPath corresponding to each data element as a parameter.
Line 706 defines a variable ‘xpaths’ as a vendor. The xpaths variable is then used to store XPath, as described below.
Line 708, application request the parser to ben parsing by providing the file identifier. Lines 709-710 begins posing and retrieves data elements from the XML data file and a variable pullParser is defined to contain the data elements.
The program loop in lines 711-725, the parser determines XPath for each data element and adds the XPath value to the vector xpaths. Lines 715-724 illustrate the manner in which different business logic can be applied (even though only a print statement is shown in all cases, for simplicity) for different node-types. Similarly, the for loop of lines 730-732 prints the Xpaths in the vector xpaths. In general, a programmer may provide a desired business logic instead of the print statements.
It may be appreciated that the embodiments described above with respect to
9. Parsers With Custom API
Lines 811-817 of
The methods setProperty (line 816) and setFeature (line 814) in XpathParserFactory, set corresponding value for property and feature in the parser to the value parsed during corresponding function calls. The methods are illustrated with examples below. However, the methods can be used with respect to other types of features and properties, as suited for the specific environment.
Lines 821-825 of
Lines 841-844 of
One of lines 842 and 843 is executed by the parser to provide the XPath value associated with each data element. The emit procedure of line 842 is used if the application had previously indicated that XPaths for the attributes need not be gouped and provided (by using the setFeature procedure of line 814) while providing the XPath of the associated data element. In such a case, separate XPaths are provided for each attribute of the data element. The emit procedure of line 843 is used otherwise, in which case the attributes are returned as values associated with the data element (along with the XPath).
The NamespaceResolver class of
For example, for the XML document:
<?xml version=“1.0” ?>
-
- <solutation xmlns=“foo”>hello</solutation>
- the element−solutation, has a namespace URI=foo. The XPath expression for this element is “/pfx:solutation” and not “/solutation”, wherein the prefix pfx could be any name and not necessarily always be pfx. The expr “/solutation” is incorrect because, the element solutation in the XML document has a namespace URI, and “/solutation” would mean to look for the element named solutation which has no names space.
Now, for the XPath engine to be able to evaluate the expr “/pfx:solution” correctly, the prefix-pfx must have been bound to some namespace, and there must be a mechanism by which the XPath engine can resolve the prefix to a namespace URI. The XPathPushParser, while parsing the XML document, would bind the prefixes used in the XPath expr to the correct namespace URIs in the NamespaceResolver. This NamespaceResolver would then be made available to the XPath engine to evaluate the XPath expression correctly.
For the example noted above, when the XPathPushParser reports the xpath as “/pfx:sdutction”, the application code can use the NamespaceResolver in the following way to resolve the namespace URI:
String ns=resolver.resolveNamespacePrefix(“pfx”);
The value of the variable “ns” would be “foo”.
When a feature http://xpath-parser/features/group-attributes is set to true, the XPath of all the attributes with their corresponding values, if any, on an element, would be gouped together as XPathAttributes (
For every attribute found, the XPath expression of the attribute and the value of the attribute is used to create the function XpathAttribute of
The implementation of the procedres of
10. Applications Using Parsers With Custom API
Line 905 defines class PushParsingXPath as being public, and the corresponding body (of the class) is contained in lines 907-933. Class PushParsingXPath represents an implentation of an event-based parser, which returns XPath corresponding to each data element according to an aspect of the present invention.
Line 906 defines a variable ‘xpaths’ as a vendor. The xpaths variable is then used to store XPath, as described below.
Line 908 is shown initializing an instance of XpathParserFactory and the corresponding handle is stored in a variable xpf to encode access to procedure names indicated by lines 811-817 of
Line 909 is shown initializing an instance of XPath based PUSH parser, and the corresponding handle is stored in a variable xpp, which enables the application to access corresponding procedures of 821-825.
Line 910 indicates to the parser that the XPaths are to be provided in a non-abbreviated formula, consistent with the definition of the procedure cl of line 814. As a result, each XPath is provided with the beginning of the XML data file as the root (e.g., as depicted in column 1020 of
Continuing with reference to
Lines 912 and 913 initialize the application to process data elements provided by the parser (by the emit statement, noted above in line 842 and 843 of
Lines 914 and 915 together encode application to report any errors, which may occur during processing in the application. The corresponding handle is stored in a variable xpehHandler. In Line 917, application provides the file identifier for XML data file to the parser.
In line 919, the parser begins parsing of XML data file and procedures of
The code of lines 921-925 and 927-931 respectively inherit the emit classes of lines 842 and 843. The xpaths.add( ) procedure is executed by each of the emit classes. However, more complex business logic can be employed, as will be apparent to one skilled in the relevant arts.
It may be observed that the above application is implemented with push parsers.
In comparison to
It may be further noted that the XPaths of
The description is continued with reference to an embodiment in which the above features are implemented in the form of software instructions executing on a digital processing system.
11. Software-Driven Implementation
CPU 1110 may execute instructions stored in RAM 1120 to provide several features of the present invention. For example, the instructions may implement one or both of parsers and applications, described above. CPU 1110 may contain only a single general purpose-processing unit or several processing units. RAM 1120 may have instructions from secondary memory 1130 using communication path 1150.
Graphics controller 1160 generates display signals (e.g., in RGB format) to display unit 1170 based on data/instructions raved from CPU 1110. Display unit 1170 contains a display screen to display the images defined by the display signals. Input interface 1190 may correspond to a keyboard and/or mouse. Graphics controller 1160 input interface 1190 may enable a user to interact directly with system 1100.
Secondary memory 1130 may contain hard drive 1135, flash memory 1136 and remove the storage drive 1137. Seondary memory 1130 may store the data and software instructions, which encode system 1100 to provide several features in accordance with the present invention. Some or all of the data and instructions may be provided on removable storage unit 1140, and the data and instructions may be read and provided by removable storage drive 1137 to CPU 1110. Floppy dive, magnetic tape dive, CD-ROM drive, DVD Drive, Flash memory, removable memory chip (PCMCI A Card, EPROM are examples of such removable storage drive 1137.
Removable storage unit 1140 may be implemented using medium and storage format compatible with removable storage drive 1137 such that readable storage drive 1137 can read the data and instructions. Thus, removable storage unit 1140 includes a computer removable storage medium having stored therein computer software and/or data
In this document, the term “computer program product” is used to generally refer to removable storage unit 1140 or hard disk installed in hard drive 1135. These computer program products are means for providing software to system 1100. CPU 1110 may retrieve the software instructions, and execute the instructions to provide various features of the present invention as described above.
12. Conclusion
While various embodiments of the present invention has been described above, it should be understood that they have been presented by way of example only, and not limitation. Thus, the breadth and scope of the present invention should not be limited by any of the above-described example embodiments, but should be defined only in accordance with the following claims and their equivalents.
Claims
1. A method of parsing a data file containing a plurality of data elements according to a markup language, said method comprising:
- receiving a file identifier of said data file from an application;
- retrieving a first data element from said data file, wherein said first data element is comprised in said plurality of data elements;
- determining a portion identifier of said first data element; and
- providing said portion identifier associated with said first data element to said application.
2. The method of claim 1, wherein said markup language comprises XML and said portion identifier comprises an XPath.
3. The method of claim 1, wherein said providing provides said portion identifier and said first data element according to an application programming interface (API), wherein said application obtains said portion identifier and said first data element by using one or more procedure calls according to said API.
4. The method of claim 3, wherein said API is defined to provide said portion identifier and said first data element as respective parameters of a single procedure call.
5. The method of claim 4, wherein said parsing is performed by an event-based parser.
6. The method of claim 3, wherein said parsing is performed by an object oriented parser, wherein said providing further comprises: storing said first data element and said portion identifier in a data structure, wherein said application obtains said first data element and said portion identifier from said data structure.
7. The method of claim 3, wherein said API provides a procedure for said application to request that said XPath is to be provided either in abbreviated or non-abbreviated format.
8. The method of claim 3, wherein said API provides a procedure for said application to request that attributes related to said first data element are to be returned as XPaths.
9. The method of claim 3, wherein said API provides a procedure for said application to request that attributes related to said first data element are to be returned as values associated with said first data element.
10. The method of claim 3, wherein said parsing is performed according to a push parsing approach, wherein said API provides a procedure for said parsing to provide said Xpath to said application.
11. The method of claim 10, wherein said API allows said application to set a variable to a value to cause said procedure to provide attributes of said data element along with said XPath.
12. A method of implementing an application using data contained in a data file, said data file containing data according to a markup language, said method comprising:
- instructing a parser to parse said data file of interest;
- obtain a portion identifier associated with a data element from said parser, wherein said portion identifier identifies said data element in said data file according to said markup language; and
- processing said data element and said portion identifier.
13. The method of claim 12, wherein said markup language comprises XML and said portion identifier comprises XPath.
14. The method of claim 12, wherein said obtaining obtains said portion identifier and said first data element according to an application programming interface (API).
15. The method of claim 14, wherein said API is defined to provide said portion identifier and said first data element as respective parameters of a single procedure call.
16. The method of claim 15, wherein said parser comprises an event-based parser.
17. The method of claim 14, wherein said parser comprises an object-oriented parser, wherein said obtaining further comprises accessing said first data element and said portion identifier in a data structure.
18. The method of claim 14, wherein said API provides a procedure for said application to request that said XPath is to be provided either in abbreviated or non-abbreviated format.
19. The method of claim 14, wherein said API provides a procedure for said application to request that attributes related to said first data element are to be returned as XPaths.
20. The method of claim 14, wherein said API provides a procedure for said application to request that attributes related to said first data element are to be returned as values associated with said first data element.
21. A computer readable medium carrying one or more sequences of instructions causing a digital processing system to parse a data file containing a plurality of data elements according to a markup language wherein execution of said one or more sequences of instructions by one or more processors contained in said digital processing system causes said one or more processors to perform the actions of:
- receiving a file identifier of said data file from an application;
- retrieving a first data element from said data file, wherein said first data element is comprised in said plurality of data elements;
- determining a portion identifier of said first data element; and
- providing said portion identifier associated with said first data element to said application.
22. The computer readable medium of claim 21, wherein said markup language comprises XML and said portion identifier comprises an XPath.
23. The computer readable medium of claim 21 wherein said providing provides said portion identifier and said first data element according to an application programming interface (API), wherein said application obtains said portion identifier and said first data element by using one or more procedure calls according to said API.
24. The computer readable medium of claim 23, wherein said API is defined to provide said portion identifier and said first data element as respective parameters of a single procedure call.
25. The computer readable medium of claim 24, wherein said parsing is performed by an event-based parser.
26. The computer readable medium of claim 23, wherein said parsing is performed by an object oriented parser, wherein said providing further comprises:
- storing said first data element and said portion identifier in a data structure, wherein said application
- obtains said first data element and said portion identifier from said data structure.
27. The computer readable medium of claim 23, wherein said API provides a procedure for said application to request that said XPath is to be provided either in abbreviated or non-abbreviated format.
28. The computer readable medium of claim 23, wherein said API provides a procedure for said application to request that attributes related to said first data element are to be returned as XPaths.
29. The computer readable medium of claim 23, wherein said API provides a procedure for said application to request that attributes related to said first data element are to be returned as values associated with said first data element.
30. The computer readable medium of claim 23, wherein said parsing is performed according to a push parsing approach, wherein said API provides a procedure for said parsing to provide said Xpath to said application.
31. The computer readable medium of claim 30, wherein said API allows said application to set a variable to a value to cause said procedure to provide attributes of said data element along with said XPath.
32. A computer readable medium carrying one or more sequences of instructions causing a digital processing system to implement an application using data contained in a data file, said data file containing data according to a markup language, wherein execution of said one or more sequences of instructions by one or more processors contained in said digital processing system causes said one or more processors to perform the actions of:
- instructing a parser to parse said data file of interest,
- obtain a portion identifier associated with a data element from said parser, wherein said portion identifier identifies said data element in said data file according to said markup language; and
- processing said data element and said portion identifier.
13. The computer readable medium of claim 32, wherein said markup language comprises XML and said portion identifier comprises XPath.
34. The computer readable medium of claim 32, wherein said obtaining obtains said portion identifier and said first data element according to an application programming interface (API).
35. The computer readable medium of claim 34, wherein said API is defined to provide said portion identifier and said first data element as respective parameters of a single procedure call.
36. The computer readable medium of claim 35, wherein said parser comprises an event-based parser.
37. The computer readable medium of claim 34, wherein said parser comprises an object oriented parser wherein said obtaining further comprises accessing said first data element and said portion identifier in a data structure.
38. The computer readable medium of claim 34, wherein said API provides a procedure for said application to request that said XPath is to be provided either in abbreviated or non-abbreviated form.
39. The computer readable medium of claim 34, wherein said API provides a procedure for said application to request that attributes related to said first data element are to be returned as XPaths.
40. The computer readable medium of claim 34, wherein said API provides a procedure for said application to request that attributes related to said first data element are to be returned as values associated with said first data element.
Type: Application
Filed: Oct 5, 2004
Publication Date: Apr 6, 2006
Patent Grant number: 8918710
Applicant: ORACLE INTERNATIONAL CORPORATION (Redwood Shores, CA)
Inventor: Rahul SRIVASTAVA (Gurgaon)
Application Number: 10/711,791
International Classification: G06F 17/30 (20060101);