javax.xml.transform.sax.SAXResult#getHandler ( )源码实例Demo

下面列出了javax.xml.transform.sax.SAXResult#getHandler ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: TencentKona-8   文件: SaxSerializer.java
public SaxSerializer(SAXResult result) {
    this(result.getHandler(),result.getLexicalHandler());
}
 
源代码2 项目: jdk8u60   文件: SaxSerializer.java
public SaxSerializer(SAXResult result) {
    this(result.getHandler(),result.getLexicalHandler());
}
 
源代码3 项目: openjdk-jdk8u   文件: SaxSerializer.java
public SaxSerializer(SAXResult result) {
    this(result.getHandler(),result.getLexicalHandler());
}
 
源代码4 项目: openjdk-jdk8u-backup   文件: SaxSerializer.java
public SaxSerializer(SAXResult result) {
    this(result.getHandler(),result.getLexicalHandler());
}
 
源代码5 项目: openjdk-jdk9   文件: SaxSerializer.java
public SaxSerializer(SAXResult result) {
    this(result.getHandler(),result.getLexicalHandler());
}
 
源代码6 项目: hottub   文件: SaxSerializer.java
public SaxSerializer(SAXResult result) {
    this(result.getHandler(),result.getLexicalHandler());
}
 
源代码7 项目: openjdk-8-source   文件: SaxSerializer.java
public SaxSerializer(SAXResult result) {
    this(result.getHandler(),result.getLexicalHandler());
}
 
源代码8 项目: PracticeCode   文件: sqlxmlExample.java
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();
      }
   }
 
源代码9 项目: openjdk-8   文件: SaxSerializer.java
public SaxSerializer(SAXResult result) {
    this(result.getHandler(),result.getLexicalHandler());
}
 
源代码10 项目: spring-analysis-note   文件: AbstractMarshaller.java
/**
 * 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);
}
 
源代码11 项目: java-technology-stack   文件: AbstractMarshaller.java
/**
 * 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);
}
 
源代码12 项目: spring4-understanding   文件: AbstractMarshaller.java
/**
 * 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);
}