tests of xerces class loading
diff --git a/tests/org.eclipse.wtp.tests.xerces/.classpath b/tests/org.eclipse.wtp.tests.xerces/.classpath
new file mode 100644
index 0000000..b7464f3
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.wtp.tests.xerces/.project b/tests/org.eclipse.wtp.tests.xerces/.project
new file mode 100644
index 0000000..4c03ff2
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.wtp.tests.xerces</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..15ae48d
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,79 @@
+#Thu Nov 29 10:32:44 EST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=ignore
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=warning
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=warning
diff --git a/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.pde.core.prefs b/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..88c6ec9
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Thu Nov 29 17:19:23 EST 2007
+eclipse.preferences.version=1
+resolve.requirebundle=false
diff --git a/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.wst.validation.prefs b/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..0fd03ac
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,6 @@
+#Thu Nov 29 16:17:16 EST 2007
+DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;
+USER_PREFERENCE=overrideGlobalPreferencesfalse
+eclipse.preferences.version=1
diff --git a/tests/org.eclipse.wtp.tests.xerces/META-INF/MANIFEST.MF b/tests/org.eclipse.wtp.tests.xerces/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..541f5ba
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.wtp.tests.xerces
+Bundle-Version: 1.0.0
+Bundle-Activator: org.eclipse.wtp.tests.xerces.Activator
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.wtp.tests.xerces
+Bundle-Localization: plugin
+Require-Bundle: org.apache.xerces,
+ org.junit
diff --git a/tests/org.eclipse.wtp.tests.xerces/build.properties b/tests/org.eclipse.wtp.tests.xerces/build.properties
new file mode 100644
index 0000000..f356a0d
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
+src.includes = src/,\
+ META-INF/,\
+ plugin.properties
diff --git a/tests/org.eclipse.wtp.tests.xerces/plugin.properties b/tests/org.eclipse.wtp.tests.xerces/plugin.properties
new file mode 100644
index 0000000..a00445c
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/plugin.properties
@@ -0,0 +1,2 @@
+#Properties file for org.eclipse.wtp.tests.xerces
+Bundle-Name.0 = Xerces Test Plug-in
\ No newline at end of file
diff --git a/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/Activator.java b/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/Activator.java
new file mode 100644
index 0000000..95e4785
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/Activator.java
@@ -0,0 +1,31 @@
+package org.eclipse.wtp.tests.xerces;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ }
+
+}
diff --git a/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/DoXercesSerialize.java b/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/DoXercesSerialize.java
new file mode 100644
index 0000000..6d9db81
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/DoXercesSerialize.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.wtp.tests.xerces;
+
+
+import java.io.IOException;
+import java.io.StringReader;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.bootstrap.DOMImplementationRegistry;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSOutput;
+import org.w3c.dom.ls.LSSerializer;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Test Xerces Serialization See
+ * http://xerces.apache.org/xerces2-j/faq-general.html#faq-6
+ */
+public class DoXercesSerialize {
+
+ /**
+ * boolean for XHTML vs HTML
+ */
+ boolean doXHTML = false;
+
+ String xmlString = "<ul>\r\n" + "<li>\r\n" + "test1\r\n" + "</li>\r\n" + "<li>\r\n" + "test2\r\n" + "</li>\r\n" + "</ul>";
+
+ private static class InternalErrorHandler implements ErrorHandler {
+ public void error(SAXParseException e) {
+ System.out.println("SAX PARSE ERROR: " + e);
+ }
+
+ public void fatalError(SAXParseException e) {
+ System.out.println("SAX PARSE FATAL ERROR: " + e);
+ }
+
+ public void warning(SAXParseException e) {
+ System.out.println("SAX PARSE WARNING: " + e);
+ }
+ }
+
+
+ private void printHeaderInfo(String test) {
+ System.out.println();
+ System.out.println("Test: " + test);
+ System.out.println("Xerces Version: " + org.apache.xerces.impl.Version.getVersion());
+ System.out.println("Serializer Version: " + org.apache.xml.serializer.Version.getVersion());
+ System.out.println("------");
+ }
+
+ private Document getTestDocument() throws IOException {
+ StringReader stringReader = new StringReader(xmlString);
+
+ Document document = null;
+
+ document = getDocument(new InputSource(stringReader), new InternalErrorHandler());
+ return document;
+ }
+
+ public void doLSwrite() throws IllegalAccessException, ClassCastException, ClassNotFoundException, InstantiationException, IOException {
+
+ printHeaderInfo("LSSerializer");
+
+ Document document = getTestDocument();
+
+ DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
+
+ DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation("LS");
+
+
+
+ LSSerializer writer = impl.createLSSerializer();
+ LSOutput output = impl.createLSOutput();
+ output.setByteStream(System.out);
+ writer.write(document, output);
+
+ }
+
+ public void doSerialize() throws TransformerFactoryConfigurationError, TransformerException, IOException {
+
+ printHeaderInfo("Transformer");
+
+ Document document = getTestDocument();
+ // Create an "identity" transformer - copies input to output
+ Transformer t = TransformerFactory.newInstance().newTransformer();
+
+ if (doXHTML) {
+ // for "XHTML" serialization, use the output method "xml"
+ // and set publicId as shown
+ t.setOutputProperty(OutputKeys.METHOD, "xml");
+
+ t.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "-//W3C//DTD XHTML 1.0 Transitional//EN");
+
+ t.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd");
+ }
+ else {
+ // For "HTML" serialization, use
+ t.setOutputProperty(OutputKeys.METHOD, "html");
+ }
+
+ // Serialize DOM tree
+ t.transform(new DOMSource(document), new StreamResult(System.out));
+
+
+ }
+
+ /**
+ * Builds a document using Xerces.
+ *
+ * @param inputSource
+ * the contents to parse.
+ * @param errorHandler
+ * the handled used by the parser.
+ * @return a document.
+ */
+ private Document getDocument(InputSource inputSource, ErrorHandler errorHandler) throws IOException {
+
+ Document document = null;
+
+ DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+ documentBuilderFactory.setNamespaceAware(true);
+ documentBuilderFactory.setValidating(false);
+
+ DocumentBuilder documentBuilder = null;
+ try {
+ documentBuilder = documentBuilderFactory.newDocumentBuilder();
+ }
+ catch (ParserConfigurationException e) {
+
+ e.printStackTrace();
+ }
+
+ documentBuilder.setErrorHandler(errorHandler);
+
+ try {
+ document = documentBuilder.parse(inputSource);
+ }
+ catch (SAXException e) {
+ e.printStackTrace();
+ }
+
+
+ return document;
+ }
+
+}
diff --git a/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/TestviaJUnitPlugin.java b/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/TestviaJUnitPlugin.java
new file mode 100644
index 0000000..dec97bd
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/TestviaJUnitPlugin.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2004 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.wtp.tests.xerces;
+
+import junit.framework.TestCase;
+
+public class TestviaJUnitPlugin extends TestCase {
+
+ public void testDoDOMAndSerialization() throws Throwable {
+ try {
+ DoXercesSerialize testXerces = new DoXercesSerialize();
+ testXerces.doSerialize();
+ // consider passed if no exception thrown
+ assertTrue(true);
+ }
+ catch (Throwable e) {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+ public void testDoLSSerialization() throws Throwable {
+ try {
+ DoXercesSerialize testXerces = new DoXercesSerialize();
+ testXerces.doLSwrite();
+ // consider passed if no exception thrown
+ assertTrue(true);
+ }
+ catch (Throwable e) {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/TestviaMain.java b/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/TestviaMain.java
new file mode 100644
index 0000000..715bdd7
--- /dev/null
+++ b/tests/org.eclipse.wtp.tests.xerces/src/org/eclipse/wtp/tests/xerces/TestviaMain.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.wtp.tests.xerces;
+
+import java.io.IOException;
+
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+
+
+
+/**
+ * Test
+ */
+public class TestviaMain {
+
+
+
+ public static void main(String argv[]) {
+
+ try {
+ DoXercesSerialize testXerces = new DoXercesSerialize();
+ testXerces.doSerialize();
+ testXerces.doLSwrite();
+
+ }
+ catch (ClassCastException e) {
+ e.printStackTrace();
+ }
+ catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ catch (InstantiationException e) {
+ e.printStackTrace();
+ }
+ catch (TransformerFactoryConfigurationError e) {
+ e.printStackTrace();
+ }
+ catch (TransformerException e) {
+ e.printStackTrace();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+}