dleslie 00/12/08 07:04:06
Modified: java/samples/ApplyXPath ApplyXPath.java
Log:
Changed getSerializer() to new API so the sample compiles
and we can do complete builds.
Still waiting for Scott's bug fixes.
Revision Changes Path
1.14 +3 -7 xml-xalan/java/samples/ApplyXPath/ApplyXPath.java
Index: ApplyXPath.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/ApplyXPath/ApplyXPath.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ApplyXPath.java 2000/12/05 13:35:31 1.13
+++ ApplyXPath.java 2000/12/08 15:04:05 1.14
@@ -60,7 +60,6 @@
import java.io.FileNotFoundException;
import org.apache.xerces.parsers.DOMParser;
import org.apache.xpath.XPathAPI;
-//import org.apache.xpath.xml.FormatterToXML;
import org.apache.xml.utils.TreeWalker;
import org.apache.xml.utils.DOMBuilder;
import org.w3c.dom.Document;
@@ -69,7 +68,6 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.traversal.NodeIterator;
-//import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import org.xml.sax.InputSource;
@@ -79,15 +77,12 @@
import javax.xml.parsers.ParserConfigurationException;
// Imported Serializer classes
-import org.apache.xalan.serialize.OutputFormat;
import org.apache.xalan.serialize.Serializer;
import org.apache.xalan.serialize.SerializerFactory;
import org.apache.xalan.serialize.DOMSerializer;
import org.apache.xalan.serialize.Method;
+import org.apache.xalan.templates.OutputProperties;
-//import org.apache.xalan.serialize.FormatterToXML;
-//import org.apache.xalan.serialize.helpers.XMLOutputFormat;
-
/**
* Very basic utility for applying an XPath epxression to an xml file and
printing information
/ about the execution of the XPath object and the nodes it finds.
@@ -156,7 +151,8 @@
try
{
// Get a Serializer
- Serializer ser = SerializerFactory.getSerializer(Method.XML);
+ Serializer ser = SerializerFactory.getSerializer
+
(OutputProperties.getDefaultMethodProperties("xml"));
// Serialize to the screen.
ser.setOutputStream(System.out);