|
From: Michael R. <mr...@us...> - 2004-07-27 12:22:50
|
Update of /cvsroot/openorb/ManagementBoard/src/main/org/openorb/board/shared/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14743/ManagementBoard/src/main/org/openorb/board/shared/util Modified Files: XMLTools.java Log Message: As long as we still support JDK 1.3.x we can't switch to the javax.xml API Index: XMLTools.java =================================================================== RCS file: /cvsroot/openorb/ManagementBoard/src/main/org/openorb/board/shared/util/XMLTools.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- XMLTools.java 10 Feb 2004 21:12:19 -0000 1.11 +++ XMLTools.java 27 Jul 2004 12:22:41 -0000 1.12 @@ -10,6 +10,11 @@ import java.util.Vector; import java.util.StringTokenizer; + +// >JDK 1.4 only +//import javax.xml.parsers.DocumentBuilder; +//import javax.xml.parsers.DocumentBuilderFactory; + import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Document; @@ -38,8 +43,6 @@ */ public XMLTools( java.io.InputStream input ) { - // TODO: use jaxp here instead of hardcoding the parser! - // Xerces parser org.apache.xerces.parsers.DOMParser parser = new org.apache.xerces.parsers.DOMParser(); @@ -47,11 +50,7 @@ { parser.parse( new org.xml.sax.InputSource( input ) ); } - catch ( org.xml.sax.SAXException ex ) - { - // TODO: ??? - } - catch ( java.io.IOException ex ) + catch ( Exception ex ) { // TODO: ??? } @@ -60,6 +59,20 @@ // The root element of the document m_rootNode = doc.getDocumentElement(); + +/* // >JDK 1.4 only + try + { + final DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = db.parse( new org.xml.sax.InputSource( input ) ); + m_rootNode = doc.getDocumentElement(); + } + catch ( Exception ex ) + { + // TODO + ex.printStackTrace(); + } +*/ } /** |