Java Code Examples for javax.xml.transform.sax.SAXResult#getHandler()
The following examples show how to use
javax.xml.transform.sax.SAXResult#getHandler() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SaxSerializer.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
Example 2
Source File: SaxSerializer.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
Example 3
Source File: SaxSerializer.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
Example 4
Source File: SaxSerializer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
Example 5
Source File: SaxSerializer.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
Example 6
Source File: SaxSerializer.java From hottub with GNU General Public License v2.0 | 4 votes |
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
Example 7
Source File: SaxSerializer.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
Example 8
Source File: sqlxmlExample.java From PracticeCode with Apache License 2.0 | 4 votes |
private static void showSetters(Connection con) { try { // Create and execute an SQL statement, retrieving an updatable result set. String SQL = "SELECT * FROM TestTable1;"; Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery(SQL); // Create an empty SQLXML object. SQLXML sqlxml = con.createSQLXML(); // Set the result value from SAX events. SAXResult sxResult = sqlxml.setResult(SAXResult.class); ContentHandler myHandler = sxResult.getHandler(); // Set the XML elements and attributes into the result. myHandler.startDocument(); myHandler.startElement(null, "contact", "contact", null); myHandler.startElement(null, "name", "name", null); myHandler.endElement(null, "name", "name"); myHandler.startElement(null, "phone", "phone", null); myHandler.endElement(null, "phone", "phone"); myHandler.endElement(null, "contact", "contact"); myHandler.endDocument(); // Update the data in the result set. rs.moveToInsertRow(); rs.updateString("Col2", "C"); rs.updateSQLXML("Col3", sqlxml); rs.insertRow(); // Display the data. System.out.println("showSetters method: Display data in TestTable1 => "); while (rs.next()) { System.out.println(rs.getString("Col1") + " : " + rs.getString("Col2")); SQLXML xml = rs.getSQLXML("Col3"); System.out.println("XML column : " + xml.getString()); } } catch (Exception e) { e.printStackTrace(); } }
Example 9
Source File: SaxSerializer.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public SaxSerializer(SAXResult result) { this(result.getHandler(),result.getLexicalHandler()); }
Example 10
Source File: AbstractMarshaller.java From spring-analysis-note with MIT License | 3 votes |
/** * Template method for handling {@code SAXResult}s. * <p>This implementation delegates to {@code marshalSaxHandlers}. * @param graph the root of the object graph to marshal * @param saxResult the {@code SAXResult} * @throws XmlMappingException if the given object cannot be marshalled to the result * @see #marshalSaxHandlers(Object, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler) */ protected void marshalSaxResult(Object graph, SAXResult saxResult) throws XmlMappingException { ContentHandler contentHandler = saxResult.getHandler(); Assert.notNull(contentHandler, "ContentHandler not set on SAXResult"); LexicalHandler lexicalHandler = saxResult.getLexicalHandler(); marshalSaxHandlers(graph, contentHandler, lexicalHandler); }
Example 11
Source File: AbstractMarshaller.java From java-technology-stack with MIT License | 3 votes |
/** * Template method for handling {@code SAXResult}s. * <p>This implementation delegates to {@code marshalSaxHandlers}. * @param graph the root of the object graph to marshal * @param saxResult the {@code SAXResult} * @throws XmlMappingException if the given object cannot be marshalled to the result * @see #marshalSaxHandlers(Object, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler) */ protected void marshalSaxResult(Object graph, SAXResult saxResult) throws XmlMappingException { ContentHandler contentHandler = saxResult.getHandler(); Assert.notNull(contentHandler, "ContentHandler not set on SAXResult"); LexicalHandler lexicalHandler = saxResult.getLexicalHandler(); marshalSaxHandlers(graph, contentHandler, lexicalHandler); }
Example 12
Source File: AbstractMarshaller.java From spring4-understanding with Apache License 2.0 | 3 votes |
/** * Template method for handling {@code SAXResult}s. * <p>This implementation delegates to {@code marshalSaxHandlers}. * @param graph the root of the object graph to marshal * @param saxResult the {@code SAXResult} * @throws XmlMappingException if the given object cannot be marshalled to the result * @see #marshalSaxHandlers(Object, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler) */ protected void marshalSaxResult(Object graph, SAXResult saxResult) throws XmlMappingException { ContentHandler contentHandler = saxResult.getHandler(); Assert.notNull(contentHandler, "ContentHandler not set on SAXResult"); LexicalHandler lexicalHandler = saxResult.getLexicalHandler(); marshalSaxHandlers(graph, contentHandler, lexicalHandler); }