diff options
Diffstat (limited to 'development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java')
-rw-r--r-- | development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java deleted file mode 100644 index 578fc46fde..0000000000 --- a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * - *******************************************************************************/ - -package org.eclipse.wst.sse.unittests.minortools; - -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * TestString - */ - -public class TestString { - - public static void main(String[] args) { - - - String xml = "<?xml version=\"1.0\" encoding=\"UTF-16\"?><message><sourceUri></sourceUri><body></body></message>"; - - - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(false); - factory.setValidating(false); - try { - DocumentBuilder builder = factory.newDocumentBuilder(); - Document document = builder.parse(new InputSource(new StringReader(xml))); - if (document != null) { - System.out.print(document.hasChildNodes()); - } - System.out.println(document); - } - catch (ParserConfigurationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - catch (SAXException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - -} |