1 18 package org.enhydra.snapper.business.xml; 19 20 import java.io.File ; 22 import java.io.FileReader ; 23 import java.io.FileWriter ; 24 import java.io.InputStream ; 25 import java.io.InputStreamReader ; 26 import java.io.IOException ; 27 import java.io.OutputStream ; 28 import java.io.OutputStreamWriter ; 29 import java.io.Reader ; 30 import java.io.Writer ; 31 import java.util.HashMap ; 32 import java.util.Iterator ; 33 import java.util.Map ; 34 import org.xml.sax.EntityResolver ; 35 import org.xml.sax.ErrorHandler ; 36 import org.xml.sax.InputSource ; 37 import org.xml.sax.Locator ; 38 import org.xml.sax.SAXException ; 39 import org.xml.sax.SAXParseException ; 40 import org.xml.sax.XMLReader ; 41 import org.xml.sax.ext.LexicalHandler ; 42 import org.xml.sax.helpers.DefaultHandler ; 43 import org.xml.sax.helpers.XMLReaderFactory ; 44 45 public class ResultImpl extends DefaultHandler implements Cloneable , Unmarshallable, LexicalHandler , Result { 46 47 private SiteName siteName; 48 private Title title; 49 private FileType fileType; 50 private FileName fileName; 51 private AbsolutFileName absolutFileName; 52 private AbsolutDirPath absolutDirPath; 53 private AbsolutFilePath absolutFilePath; 54 private RelativeDirPath relativeDirPath; 55 private RelativeFilePath relativeFilePath; 56 private Mapped mapped; 57 private GrantedDownload grantedDownload; 58 private Score score; 59 private Modified modified; 60 private Content content; 61 private Properties properties; 62 private MetaData metaData; 63 64 65 private String docTypeString; 66 67 68 private String outputEncoding; 69 70 71 private Unmarshallable zeus_currentUNode; 72 73 74 private Unmarshallable zeus_parentUNode; 75 76 77 private boolean zeus_thisNodeHandled = false; 78 79 80 private boolean hasDTD; 81 82 83 private boolean validate; 84 85 86 private Map namespaceMappings; 87 88 89 private static EntityResolver entityResolver; 90 91 92 private static ErrorHandler errorHandler; 93 94 private static ResultImpl prototype = null; 95 96 public static void setPrototype(ResultImpl prototype) { 97 ResultImpl.prototype = prototype; 98 } 99 public static ResultImpl newInstance() { 100 try { 101 return (prototype!=null)?(ResultImpl)prototype.clone(): new ResultImpl(); 102 } catch (CloneNotSupportedException e) { 103 return null; } 105 } 106 public ResultImpl() { 107 docTypeString = ""; 108 hasDTD = false; 109 validate = false; 110 namespaceMappings = new HashMap (); 111 } 112 113 public SiteName getSiteName() { 114 return siteName; 115 } 116 117 public void setSiteName(SiteName siteName) { 118 this.siteName = siteName; 119 } 120 121 public Title getTitle() { 122 return title; 123 } 124 125 public void setTitle(Title title) { 126 this.title = title; 127 } 128 129 public FileType getFileType() { 130 return fileType; 131 } 132 133 public void setFileType(FileType fileType) { 134 this.fileType = fileType; 135 } 136 137 public FileName getFileName() { 138 return fileName; 139 } 140 141 public void setFileName(FileName fileName) { 142 this.fileName = fileName; 143 } 144 145 public AbsolutFileName getAbsolutFileName() { 146 return absolutFileName; 147 } 148 149 public void setAbsolutFileName(AbsolutFileName absolutFileName) { 150 this.absolutFileName = absolutFileName; 151 } 152 153 public AbsolutDirPath getAbsolutDirPath() { 154 return absolutDirPath; 155 } 156 157 public void setAbsolutDirPath(AbsolutDirPath absolutDirPath) { 158 this.absolutDirPath = absolutDirPath; 159 } 160 161 public AbsolutFilePath getAbsolutFilePath() { 162 return absolutFilePath; 163 } 164 165 public void setAbsolutFilePath(AbsolutFilePath absolutFilePath) { 166 this.absolutFilePath = absolutFilePath; 167 } 168 169 public RelativeDirPath getRelativeDirPath() { 170 return relativeDirPath; 171 } 172 173 public void setRelativeDirPath(RelativeDirPath relativeDirPath) { 174 this.relativeDirPath = relativeDirPath; 175 } 176 177 public RelativeFilePath getRelativeFilePath() { 178 return relativeFilePath; 179 } 180 181 public void setRelativeFilePath(RelativeFilePath relativeFilePath) { 182 this.relativeFilePath = relativeFilePath; 183 } 184 185 public Mapped getMapped() { 186 return mapped; 187 } 188 189 public void setMapped(Mapped mapped) { 190 this.mapped = mapped; 191 } 192 193 public GrantedDownload getGrantedDownload() { 194 return grantedDownload; 195 } 196 197 public void setGrantedDownload(GrantedDownload grantedDownload) { 198 this.grantedDownload = grantedDownload; 199 } 200 201 public Score getScore() { 202 return score; 203 } 204 205 public void setScore(Score score) { 206 this.score = score; 207 } 208 209 public Modified getModified() { 210 return modified; 211 } 212 213 public void setModified(Modified modified) { 214 this.modified = modified; 215 } 216 217 public Content getContent() { 218 return content; 219 } 220 221 public void setContent(Content content) { 222 this.content = content; 223 } 224 225 public Properties getProperties() { 226 return properties; 227 } 228 229 public void setProperties(Properties properties) { 230 this.properties = properties; 231 } 232 233 public MetaData getMetaData() { 234 return metaData; 235 } 236 237 public void setMetaData(MetaData metaData) { 238 this.metaData = metaData; 239 } 240 241 public void setDocType(String name, String publicID, String systemID) { 242 try { 243 startDTD(name, publicID, systemID); 244 } catch (SAXException neverHappens) { } 245 } 246 247 public void setOutputEncoding(String outputEncoding) { 248 this.outputEncoding = outputEncoding; 249 } 250 251 public void marshal(File file) throws IOException { 252 marshal(new FileWriter (file)); 254 } 255 256 public void marshal(OutputStream outputStream) throws IOException { 257 marshal(new OutputStreamWriter (outputStream)); 259 } 260 261 public void marshal(Writer writer) throws IOException { 262 writer.write("<?xml version=\"1.0\" "); 264 if (outputEncoding != null) { 265 writer.write("encoding=\""); 266 writer.write(outputEncoding); 267 writer.write("\"?>\n\n"); 268 269 } else { 270 writer.write("encoding=\"UTF-8\"?>\n\n"); 271 272 } 273 writer.write(docTypeString); 275 writer.write("\n"); 276 writeXMLRepresentation(writer, ""); 278 279 writer.flush(); 281 writer.close(); 282 } 283 284 protected void writeXMLRepresentation(Writer writer, 285 String indent) 286 throws IOException { 287 288 writer.write(indent); 289 writer.write("<Result"); 290 291 for (Iterator i = namespaceMappings.keySet().iterator(); i.hasNext(); ) { 293 String prefix = (String )i.next(); 294 String uri = (String )namespaceMappings.get(prefix); 295 writer.write(" xmlns"); 296 if (!prefix.trim().equals("")) { 297 writer.write(":"); 298 writer.write(prefix); 299 } 300 writer.write("=\""); 301 writer.write(uri); 302 writer.write("\"\n "); 303 } 304 305 writer.write(">"); 307 writer.write("\n"); 308 309 if (siteName != null) { 311 ((SiteNameImpl)siteName).writeXMLRepresentation(writer, 312 new StringBuffer (indent).append(" ").toString()); 313 } 314 315 if (title != null) { 316 ((TitleImpl)title).writeXMLRepresentation(writer, 317 new StringBuffer (indent).append(" ").toString()); 318 } 319 320 if (fileType != null) { 321 ((FileTypeImpl)fileType).writeXMLRepresentation(writer, 322 new StringBuffer (indent).append(" ").toString()); 323 } 324 325 if (fileName != null) { 326 ((FileNameImpl)fileName).writeXMLRepresentation(writer, 327 new StringBuffer (indent).append(" ").toString()); 328 } 329 330 if (absolutFileName != null) { 331 ((AbsolutFileNameImpl)absolutFileName).writeXMLRepresentation(writer, 332 new StringBuffer (indent).append(" ").toString()); 333 } 334 335 if (absolutDirPath != null) { 336 ((AbsolutDirPathImpl)absolutDirPath).writeXMLRepresentation(writer, 337 new StringBuffer (indent).append(" ").toString()); 338 } 339 340 if (absolutFilePath != null) { 341 ((AbsolutFilePathImpl)absolutFilePath).writeXMLRepresentation(writer, 342 new StringBuffer (indent).append(" ").toString()); 343 } 344 345 if (relativeDirPath != null) { 346 ((RelativeDirPathImpl)relativeDirPath).writeXMLRepresentation(writer, 347 new StringBuffer (indent).append(" ").toString()); 348 } 349 350 if (relativeFilePath != null) { 351 ((RelativeFilePathImpl)relativeFilePath).writeXMLRepresentation(writer, 352 new StringBuffer (indent).append(" ").toString()); 353 } 354 355 if (mapped != null) { 356 ((MappedImpl)mapped).writeXMLRepresentation(writer, 357 new StringBuffer (indent).append(" ").toString()); 358 } 359 360 if (grantedDownload != null) { 361 ((GrantedDownloadImpl)grantedDownload).writeXMLRepresentation(writer, 362 new StringBuffer (indent).append(" ").toString()); 363 } 364 365 if (score != null) { 366 ((ScoreImpl)score).writeXMLRepresentation(writer, 367 new StringBuffer (indent).append(" ").toString()); 368 } 369 370 if (modified != null) { 371 ((ModifiedImpl)modified).writeXMLRepresentation(writer, 372 new StringBuffer (indent).append(" ").toString()); 373 } 374 375 if (content != null) { 376 ((ContentImpl)content).writeXMLRepresentation(writer, 377 new StringBuffer (indent).append(" ").toString()); 378 } 379 380 if (properties != null) { 381 ((PropertiesImpl)properties).writeXMLRepresentation(writer, 382 new StringBuffer (indent).append(" ").toString()); 383 } 384 385 if (metaData != null) { 386 ((MetaDataImpl)metaData).writeXMLRepresentation(writer, 387 new StringBuffer (indent).append(" ").toString()); 388 } 389 390 writer.write(indent); 391 writer.write("</Result>\n"); 392 } 393 394 private String escapeAttributeValue(String attributeValue) { 395 String returnValue = attributeValue; 396 for (int i = 0; i < returnValue.length(); i++) { 397 char ch = returnValue.charAt(i); 398 if (ch == '"') { 399 returnValue = new StringBuffer () 400 .append(returnValue.substring(0, i)) 401 .append(""") 402 .append(returnValue.substring(i+1)) 403 .toString(); 404 } 405 } 406 return returnValue; 407 } 408 409 private String escapeTextValue(String textValue) { 410 String returnValue = textValue; 411 for (int i = 0; i < returnValue.length(); i++) { 412 char ch = returnValue.charAt(i); 413 if (ch == '<') { 414 returnValue = new StringBuffer () 415 .append(returnValue.substring(0, i)) 416 .append("<") 417 .append(returnValue.substring(i+1)) 418 .toString(); 419 } else if (ch == '>') { 420 returnValue = new StringBuffer () 421 .append(returnValue.substring(0, i)) 422 .append(">") 423 .append(returnValue.substring(i+1)) 424 .toString(); 425 } 426 } 427 return returnValue; 428 } 429 430 437 public static void setEntityResolver(EntityResolver resolver) { 438 entityResolver = resolver; 439 } 440 441 448 public static void setErrorHandler(ErrorHandler handler) { 449 errorHandler = handler; 450 } 451 452 public static Result unmarshal(File file) throws IOException { 453 return unmarshal(new FileReader (file)); 455 } 456 457 public static Result unmarshal(File file, boolean validate) throws IOException { 458 return unmarshal(new FileReader (file), validate); 460 } 461 462 public static Result unmarshal(InputStream inputStream) throws IOException { 463 return unmarshal(new InputStreamReader (inputStream)); 465 } 466 467 public static Result unmarshal(InputStream inputStream, boolean validate) throws IOException { 468 return unmarshal(new InputStreamReader (inputStream), validate); 470 } 471 472 public static Result unmarshal(Reader reader) throws IOException { 473 return unmarshal(reader, false); 475 } 476 477 public static Result unmarshal(Reader reader, boolean validate) throws IOException { 478 ResultImpl result = ResultImpl.newInstance(); 479 result.setValidating(validate); 480 result.setCurrentUNode(result); 481 result.setParentUNode(null); 482 XMLReader parser = null; 484 String parserClass = System.getProperty("org.xml.sax.driver", 485 "org.apache.xerces.parsers.SAXParser"); 486 try { 487 parser = XMLReaderFactory.createXMLReader(parserClass); 488 489 if (entityResolver != null) { 491 parser.setEntityResolver(entityResolver); 492 } 493 494 parser.setErrorHandler(result); 496 497 parser.setProperty("http://xml.org/sax/properties/lexical-handler", result); 499 500 parser.setContentHandler(result); 502 } catch (SAXException e) { 503 throw new IOException ("Could not load XML parser: " + 504 e.getMessage()); 505 } 506 507 InputSource inputSource = new InputSource (reader); 508 try { 509 parser.setFeature("http://xml.org/sax/features/validation", new Boolean (validate).booleanValue()); 510 parser.setFeature("http://xml.org/sax/features/namespaces", true); 511 parser.setFeature("http://xml.org/sax/features/namespace-prefixes", false); 512 parser.parse(inputSource); 513 } catch (SAXException e) { 514 throw new IOException ("Error parsing XML document: " + 515 e.getMessage()); 516 } 517 518 return result; 520 } 521 522 public Unmarshallable getParentUNode() { 523 return zeus_parentUNode; 524 } 525 526 public void setParentUNode(Unmarshallable parentUNode) { 527 this.zeus_parentUNode = parentUNode; 528 } 529 530 public Unmarshallable getCurrentUNode() { 531 return zeus_currentUNode; 532 } 533 534 public void setCurrentUNode(Unmarshallable currentUNode) { 535 this.zeus_currentUNode = currentUNode; 536 } 537 538 public void setValidating(boolean validate) { 539 this.validate = validate; 540 } 541 542 public void startDocument() throws SAXException { 543 } 545 546 public void setDocumentLocator(Locator locator) { 547 } 549 550 public void startPrefixMapping(String prefix, String uri) 551 throws SAXException { 552 namespaceMappings.put(prefix, uri); 553 } 554 555 public void startElement(String namespaceURI, String localName, 556 String qName, org.xml.sax.Attributes atts) 557 throws SAXException { 558 559 Unmarshallable current = getCurrentUNode(); 561 if (current != this) { 562 current.startElement(namespaceURI, localName, qName, atts); 563 return; 564 } 565 566 if ((localName.equals("Result")) && (!zeus_thisNodeHandled)) { 568 for (int i=0, len=atts.getLength(); i<len; i++) { 570 String attName= atts.getLocalName(i); 571 String attValue = atts.getValue(i); 572 } 573 zeus_thisNodeHandled = true; 574 return; 575 } else { 576 if (localName.equals("SiteName") && (siteName==null)) { 578 SiteNameImpl siteName = SiteNameImpl.newInstance(); 579 current = getCurrentUNode(); 580 siteName.setParentUNode(current); 581 siteName.setCurrentUNode(siteName); 582 this.setCurrentUNode(siteName); 583 siteName.startElement(namespaceURI, localName, qName, atts); 584 this.siteName = siteName; 586 return; 587 } 588 if (localName.equals("Title") && (title==null)) { 589 TitleImpl title = TitleImpl.newInstance(); 590 current = getCurrentUNode(); 591 title.setParentUNode(current); 592 title.setCurrentUNode(title); 593 this.setCurrentUNode(title); 594 title.startElement(namespaceURI, localName, qName, atts); 595 this.title = title; 597 return; 598 } 599 if (localName.equals("FileType") && (fileType==null)) { 600 FileTypeImpl fileType = FileTypeImpl.newInstance(); 601 current = getCurrentUNode(); 602 fileType.setParentUNode(current); 603 fileType.setCurrentUNode(fileType); 604 this.setCurrentUNode(fileType); 605 fileType.startElement(namespaceURI, localName, qName, atts); 606 this.fileType = fileType; 608 return; 609 } 610 if (localName.equals("FileName") && (fileName==null)) { 611 FileNameImpl fileName = FileNameImpl.newInstance(); 612 current = getCurrentUNode(); 613 fileName.setParentUNode(current); 614 fileName.setCurrentUNode(fileName); 615 this.setCurrentUNode(fileName); 616 fileName.startElement(namespaceURI, localName, qName, atts); 617 this.fileName = fileName; 619 return; 620 } 621 if (localName.equals("AbsolutFileName") && (absolutFileName==null)) { 622 AbsolutFileNameImpl absolutFileName = AbsolutFileNameImpl.newInstance(); 623 current = getCurrentUNode(); 624 absolutFileName.setParentUNode(current); 625 absolutFileName.setCurrentUNode(absolutFileName); 626 this.setCurrentUNode(absolutFileName); 627 absolutFileName.startElement(namespaceURI, localName, qName, atts); 628 this.absolutFileName = absolutFileName; 630 return; 631 } 632 if (localName.equals("AbsolutDirPath") && (absolutDirPath==null)) { 633 AbsolutDirPathImpl absolutDirPath = AbsolutDirPathImpl.newInstance(); 634 current = getCurrentUNode(); 635 absolutDirPath.setParentUNode(current); 636 absolutDirPath.setCurrentUNode(absolutDirPath); 637 this.setCurrentUNode(absolutDirPath); 638 absolutDirPath.startElement(namespaceURI, localName, qName, atts); 639 this.absolutDirPath = absolutDirPath; 641 return; 642 } 643 if (localName.equals("AbsolutFilePath") && (absolutFilePath==null)) { 644 AbsolutFilePathImpl absolutFilePath = AbsolutFilePathImpl.newInstance(); 645 current = getCurrentUNode(); 646 absolutFilePath.setParentUNode(current); 647 absolutFilePath.setCurrentUNode(absolutFilePath); 648 this.setCurrentUNode(absolutFilePath); 649 absolutFilePath.startElement(namespaceURI, localName, qName, atts); 650 this.absolutFilePath = absolutFilePath; 652 return; 653 } 654 if (localName.equals("RelativeDirPath") && (relativeDirPath==null)) { 655 RelativeDirPathImpl relativeDirPath = RelativeDirPathImpl.newInstance(); 656 current = getCurrentUNode(); 657 relativeDirPath.setParentUNode(current); 658 relativeDirPath.setCurrentUNode(relativeDirPath); 659 this.setCurrentUNode(relativeDirPath); 660 relativeDirPath.startElement(namespaceURI, localName, qName, atts); 661 this.relativeDirPath = relativeDirPath; 663 return; 664 } 665 if (localName.equals("RelativeFilePath") && (relativeFilePath==null)) { 666 RelativeFilePathImpl relativeFilePath = RelativeFilePathImpl.newInstance(); 667 current = getCurrentUNode(); 668 relativeFilePath.setParentUNode(current); 669 relativeFilePath.setCurrentUNode(relativeFilePath); 670 this.setCurrentUNode(relativeFilePath); 671 relativeFilePath.startElement(namespaceURI, localName, qName, atts); 672 this.relativeFilePath = relativeFilePath; 674 return; 675 } 676 if (localName.equals("Mapped") && (mapped==null)) { 677 MappedImpl mapped = MappedImpl.newInstance(); 678 current = getCurrentUNode(); 679 mapped.setParentUNode(current); 680 mapped.setCurrentUNode(mapped); 681 this.setCurrentUNode(mapped); 682 mapped.startElement(namespaceURI, localName, qName, atts); 683 this.mapped = mapped; 685 return; 686 } 687 if (localName.equals("GrantedDownload") && (grantedDownload==null)) { 688 GrantedDownloadImpl grantedDownload = GrantedDownloadImpl.newInstance(); 689 current = getCurrentUNode(); 690 grantedDownload.setParentUNode(current); 691 grantedDownload.setCurrentUNode(grantedDownload); 692 this.setCurrentUNode(grantedDownload); 693 grantedDownload.startElement(namespaceURI, localName, qName, atts); 694 this.grantedDownload = grantedDownload; 696 return; 697 } 698 if (localName.equals("Score") && (score==null)) { 699 ScoreImpl score = ScoreImpl.newInstance(); 700 current = getCurrentUNode(); 701 score.setParentUNode(current); 702 score.setCurrentUNode(score); 703 this.setCurrentUNode(score); 704 score.startElement(namespaceURI, localName, qName, atts); 705 this.score = score; 707 return; 708 } 709 if (localName.equals("Modified") && (modified==null)) { 710 ModifiedImpl modified = ModifiedImpl.newInstance(); 711 current = getCurrentUNode(); 712 modified.setParentUNode(current); 713 modified.setCurrentUNode(modified); 714 this.setCurrentUNode(modified); 715 modified.startElement(namespaceURI, localName, qName, atts); 716 this.modified = modified; 718 return; 719 } 720 if (localName.equals("Content") && (content==null)) { 721 ContentImpl content = ContentImpl.newInstance(); 722 current = getCurrentUNode(); 723 content.setParentUNode(current); 724 content.setCurrentUNode(content); 725 this.setCurrentUNode(content); 726 content.startElement(namespaceURI, localName, qName, atts); 727 this.content = content; 729 return; 730 } 731 if (localName.equals("Properties") && (properties==null)) { 732 PropertiesImpl properties = PropertiesImpl.newInstance(); 733 current = getCurrentUNode(); 734 properties.setParentUNode(current); 735 properties.setCurrentUNode(properties); 736 this.setCurrentUNode(properties); 737 properties.startElement(namespaceURI, localName, qName, atts); 738 this.properties = properties; 740 return; 741 } 742 if (localName.equals("MetaData") && (metaData==null)) { 743 MetaDataImpl metaData = MetaDataImpl.newInstance(); 744 current = getCurrentUNode(); 745 metaData.setParentUNode(current); 746 metaData.setCurrentUNode(metaData); 747 this.setCurrentUNode(metaData); 748 metaData.startElement(namespaceURI, localName, qName, atts); 749 this.metaData = metaData; 751 return; 752 } 753 } 754 } 755 756 public void endElement(String namespaceURI, String localName, 757 String qName) 758 throws SAXException { 759 760 Unmarshallable current = getCurrentUNode(); 761 if (current != this) { 762 current.endElement(namespaceURI, localName, qName); 763 return; 764 } 765 766 Unmarshallable parent = getCurrentUNode().getParentUNode(); 767 if (parent != null) { 768 parent.setCurrentUNode(parent); 769 } 770 } 771 772 public void characters(char[] ch, int start, int len) 773 throws SAXException { 774 775 Unmarshallable current = getCurrentUNode(); 777 if (current != this) { 778 current.characters(ch, start, len); 779 return; 780 } 781 782 String text = new String (ch, start, len); 783 } 784 785 public void comment(char ch[], int start, int len) throws SAXException { 786 } 788 789 public void warning(SAXParseException e) throws SAXException { 790 if (errorHandler != null) { 791 errorHandler.warning(e); 792 } 793 } 794 795 public void error(SAXParseException e) throws SAXException { 796 if ((validate) && (!hasDTD)) { 797 throw new SAXException ("Validation is turned on, but no DTD has been specified in the input XML document. Please supply a DTD through a DOCTYPE reference."); 798 } 799 if (errorHandler != null) { 800 errorHandler.error(e); 801 } 802 } 803 804 public void fatalError(SAXParseException e) throws SAXException { 805 if ((validate) && (!hasDTD)) { 806 throw new SAXException ("Validation is turned on, but no DTD has been specified in the input XML document. Please supply a DTD through a DOCTYPE reference."); 807 } 808 if (errorHandler != null) { 809 errorHandler.fatalError(e); 810 } 811 } 812 813 public void startDTD(String name, String publicID, String systemID) 814 throws SAXException { 815 816 if ((name == null) || (name.equals(""))) { 817 docTypeString = ""; 818 return; 819 } 820 821 hasDTD = true; 822 StringBuffer docTypeSB = new StringBuffer (); 823 boolean hasPublic = false; 824 825 docTypeSB.append("<!DOCTYPE ") 826 .append(name); 827 828 if ((publicID != null) && (!publicID.equals(""))) { 829 docTypeSB.append(" PUBLIC \"") 830 .append(publicID) 831 .append("\""); 832 hasPublic = true; 833 } 834 835 if ((systemID != null) && (!systemID.equals(""))) { 836 if (!hasPublic) { 837 docTypeSB.append(" SYSTEM"); 838 } 839 docTypeSB.append(" \"") 840 .append(systemID) 841 .append("\""); 842 843 } 844 845 docTypeSB.append(">"); 846 847 docTypeString = docTypeSB.toString(); 848 } 849 850 public void endDTD() throws SAXException { 851 } 853 854 public void startEntity(String name) throws SAXException { 855 } 857 858 public void endEntity(String name) throws SAXException { 859 } 861 862 public void startCDATA() throws SAXException { 863 } 865 866 public void endCDATA() throws SAXException { 867 } 869 870 } 871 | Popular Tags |