KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > xml > transform > dom > DOMSource

javax.xml.transform.dom
Class DOMSource

java.lang.Object
  extended by javax.xml.transform.dom.DOMSource
All Implemented Interfaces:
Source
See Also:
Top Examples, Source Code, DocumentBuilderFactory.setNamespaceAware(boolean awareness)

public DOMSource()
See Also:
Transformer.transform(Source xmlSource, Result outputTarget), DocumentBuilder.newDocument(), Document, setNode(Node node)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[522]XML Parsing Example
By Anonymous on 2003/11/17 09:47:58  Rate
//XML Parsing Example 
 DocumentBuilderFactory factory; 
 DocumentBuilder builder; 
 Document document = null; 
 DOMSource source = null; 
  
  
 try  {  
     factory = DocumentBuilderFactory.newInstance (  ) ; 
     factory.setNameSpaceAware ( true ) ; 
     factory.setValidating ( true ) ; 
     builder = factory.newDocumentBuilder (  ) ; 
     document = builder.parse ( new File ( fileName )  ) ; 
     source = DOMSource ( document ) ; 
  }  catch  ( ParserConfigurationException pce )   {  
     // exception code 
  }  catch  ( SAXException se )   {  // DOM reuses some SAX classes 
     // Exception code 
  }  catch  ( IOException ioe )   {  
     // Exception code 
  } 


public DOMSource(Node n)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public DOMSource(Node node,
                 String systemID)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final String FEATURE
See Also:
TransformerFactory.getFeature(java.lang.String)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Node getNode()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getSystemId()
See Also:
Source
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setNode(Node node)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setSystemId(String systemID)
See Also:
Source
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags