-
Book Overview & Buying
-
Table Of Contents
Processing XML documents with Oracle JDeveloper 11g
An XML developer may be interested in filtering an XML document as the document is loaded, or as the document is stored. Filtering is used if you only need to load or save a section of an XML document. In this section we shall filter nodes with the DOM 3 Load and Save API. We shall load an XML document by selecting nodes from the input, and save an XML document by selecting nodes from the DOM object to be saved. The DOM 3.0 LS API provides interfaces to filter input from an XML document and filter output to an XML document. The LSParserFilter interface is used to filter input and the LSSerializerFilter interface is used to filter output.
First, we need to define a class that implements the LSParserFilter interface. In the class that implements the LSParserFilter interface, implement methods acceptNode(Node), getWhatToShow(), and startElement(Element). The input filter class is listed as follows:
private class InputFilter implements LSParserFilter...
Change the font size
Change margin width
Change background colour