Hi all,
Please check the attachments for the java and xml
files. I'm trying to compile the java file. I'm getting the errors as in the
error.txt file.
Please do guide me where i'm going
wrong.
Thanks in advance,
Jyotinarayan
|
<?xml version="1.0"?> <!-- We don't need these yet <?xml-stylesheet href="XSL\JavaXML.html.xsl" type="text/xsl"?> <?xml-stylesheet href="XSL\JavaXML.wml.xsl" type="text/xsl" media="wap"?> <?cocoon-process type="xslt"?> <!DOCTYPE JavaXML:Book SYSTEM "DTD\JavaXML.dtd"> --> <!-- Java and XML --> <JavaXML:Book xmlns:JavaXML="http://www.oreilly.com/catalog/javaxml/"> <JavaXML:Title>Java and XML</JavaXML:Title> <JavaXML:Contents> <JavaXML:Chapter focus="XML"> <JavaXML:Heading>Introduction</JavaXML:Heading> <JavaXML:Topic subSections="7">What Is It?</JavaXML:Topic> <JavaXML:Topic subSections="3">How Do I Use It?</JavaXML:Topic> <JavaXML:Topic subSections="4">Why Should I Use It?</JavaXML:Topic> <JavaXML:Topic subSections="0">What's Next?</JavaXML:Topic> </JavaXML:Chapter> <JavaXML:Chapter focus="XML"> <JavaXML:Heading>Creating XML</JavaXML:Heading> <JavaXML:Topic subSections="0">An XML Document</JavaXML:Topic> <JavaXML:Topic subSections="2">The Header</JavaXML:Topic> <JavaXML:Topic subSections="6">The Content</JavaXML:Topic> <JavaXML:Topic subSections="1">What's Next?</JavaXML:Topic> </JavaXML:Chapter> <JavaXML:Chapter focus="Java"> <JavaXML:Heading>Parsing XML</JavaXML:Heading> <JavaXML:Topic subSections="3">Getting Prepared</JavaXML:Topic> <JavaXML:Topic subSections="3">SAX Readers</JavaXML:Topic> <JavaXML:Topic subSections="9">Content Handlers</JavaXML:Topic> <JavaXML:Topic subSections="4">Error Handlers</JavaXML:Topic> <JavaXML:Topic subSections="0"> A Better Way to Load a Parser </JavaXML:Topic> <JavaXML:Topic subSections="4">"Gotcha!"</JavaXML:Topic> <JavaXML:Topic subSections="0">What's Next?</JavaXML:Topic> </JavaXML:Chapter> <JavaXML:SectionBreak/> <JavaXML:Chapter focus="Java"> <JavaXML:Heading>Web Publishing Frameworks</JavaXML:Heading> <JavaXML:Topic subSections="4">Selecting a Framework</JavaXML:Topic> <JavaXML:Topic subSections="4">Installation</JavaXML:Topic> <JavaXML:Topic subSections="3"> Using a Publishing Framework </JavaXML:Topic> <JavaXML:Topic subSections="2">XSP</JavaXML:Topic> <JavaXML:Topic subSections="3">Cocoon 2.0 and Beyond</JavaXML:Topic> <JavaXML:Topic subSections="0">What's Next?</JavaXML:Topic> </JavaXML:Chapter> </JavaXML:Contents> <!-- Leave out until DTD section <JavaXML:Copyright>&OReillyCopyright;</JavaXML:Copyright> --> </JavaXML:Book>
C:\javaxml\ch03\SAXParserDemo.java:37: cannot resolve symbol symbol : class Attributes location: package sax import org.xml.sax.Attributes; ^ C:\javaxml\ch03\SAXParserDemo.java:38: cannot resolve symbol symbol : class ContentHandler location: package sax import org.xml.sax.ContentHandler; ^ C:\javaxml\ch03\SAXParserDemo.java:39: cannot resolve symbol symbol : class ErrorHandler location: package sax import org.xml.sax.ErrorHandler; ^ C:\javaxml\ch03\SAXParserDemo.java:40: cannot resolve symbol symbol : class Locator location: package sax import org.xml.sax.Locator; ^ C:\javaxml\ch03\SAXParserDemo.java:41: cannot resolve symbol symbol : class SAXException location: package sax import org.xml.sax.SAXException; ^ C:\javaxml\ch03\SAXParserDemo.java:42: cannot resolve symbol symbol : class SAXParseException location: package sax import org.xml.sax.SAXParseException; ^ C:\javaxml\ch03\SAXParserDemo.java:43: cannot resolve symbol symbol : class XMLReader location: package sax import org.xml.sax.XMLReader; ^ C:\javaxml\ch03\SAXParserDemo.java:44: cannot resolve symbol symbol : class XMLReaderFactory location: package helpers import org.xml.sax.helpers.XMLReaderFactory; ^ C:\javaxml\ch03\SAXParserDemo.java:119: cannot resolve symbol symbol : class ContentHandler location: class MyContentHandler class MyContentHandler implements ContentHandler { ^ C:\javaxml\ch03\SAXParserDemo.java:122: cannot resolve symbol symbol : class Locator location: class MyContentHandler private Locator locator; ^ C:\javaxml\ch03\SAXParserDemo.java:133: cannot resolve symbol symbol : class Locator location: class MyContentHandler public void setDocumentLocator(Locator locator) { ^ C:\javaxml\ch03\SAXParserDemo.java:148: cannot resolve symbol symbol : class SAXException location: class MyContentHandler public void startDocument() throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:160: cannot resolve symbol symbol : class SAXException location: class MyContentHandler public void endDocument() throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:177: cannot resolve symbol symbol : class SAXException location: class MyContentHandler throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:237: cannot resolve symbol symbol : class Attributes location: class MyContentHandler String rawName, Attributes atts) ^ C:\javaxml\ch03\SAXParserDemo.java:238: cannot resolve symbol symbol : class SAXException location: class MyContentHandler throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:269: cannot resolve symbol symbol : class SAXException location: class MyContentHandler throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:285: cannot resolve symbol symbol : class SAXException location: class MyContentHandler throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:304: cannot resolve symbol symbol : class SAXException location: class MyContentHandler throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:320: cannot resolve symbol symbol : class SAXException location: class MyContentHandler public void skippedEntity(String name) throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:332: cannot resolve symbol symbol : class ErrorHandler location: class MyErrorHandler class MyErrorHandler implements ErrorHandler { ^ C:\javaxml\ch03\SAXParserDemo.java:344: cannot resolve symbol symbol : class SAXParseException location: class MyErrorHandler public void warning(SAXParseException exception) ^ C:\javaxml\ch03\SAXParserDemo.java:345: cannot resolve symbol symbol : class SAXException location: class MyErrorHandler throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:367: cannot resolve symbol symbol : class SAXParseException location: class MyErrorHandler public void error(SAXParseException exception) ^ C:\javaxml\ch03\SAXParserDemo.java:368: cannot resolve symbol symbol : class SAXException location: class MyErrorHandler throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:390: cannot resolve symbol symbol : class SAXParseException location: class MyErrorHandler public void fatalError(SAXParseException exception) ^ C:\javaxml\ch03\SAXParserDemo.java:391: cannot resolve symbol symbol : class SAXException location: class MyErrorHandler throws SAXException { ^ C:\javaxml\ch03\SAXParserDemo.java:67: cannot resolve symbol symbol : class ContentHandler location: class SAXParserDemo ContentHandler contentHandler = new MyContentHandler(); ^ C:\javaxml\ch03\SAXParserDemo.java:68: cannot resolve symbol symbol : class ErrorHandler location: class SAXParserDemo ErrorHandler errorHandler = new MyErrorHandler(); ^ C:\javaxml\ch03\SAXParserDemo.java:72: cannot resolve symbol symbol : class XMLReader location: class SAXParserDemo XMLReader parser = ^ C:\javaxml\ch03\SAXParserDemo.java:73: cannot resolve symbol symbol : variable XMLReaderFactory location: class SAXParserDemo XMLReaderFactory.createXMLReader( ^ C:\javaxml\ch03\SAXParserDemo.java:87: cannot resolve symbol symbol : class SAXException location: class SAXParserDemo } catch (SAXException e) { ^ C:\javaxml\ch03\SAXParserDemo.java:354: cannot resolve symbol symbol : class SAXException location: class MyErrorHandler throw new SAXException("Warning encountered"); ^ C:\javaxml\ch03\SAXParserDemo.java:377: cannot resolve symbol symbol : class SAXException location: class MyErrorHandler throw new SAXException("Error encountered"); ^ C:\javaxml\ch03\SAXParserDemo.java:400: cannot resolve symbol symbol : class SAXException location: class MyErrorHandler throw new SAXException("Fatal Error encountered"); ^ 35 errors Tool completed with exit code 1