001package com.hfg.xml; 002 003import java.io.*; 004import java.nio.charset.Charset; 005 006 007//------------------------------------------------------------------------------ 008/** 009 XMLDoc is a generic XML document container. 010 011 @author J. Alex Taylor, hairyfatguy.com 012 */ 013//------------------------------------------------------------------------------ 014// com.hfg XML/HTML Coding Library 015// 016// This library is free software; you can redistribute it and/or 017// modify it under the terms of the GNU Lesser General Public 018// License as published by the Free Software Foundation; either 019// version 2.1 of the License, or (at your option) any later version. 020// 021// This library is distributed in the hope that it will be useful, 022// but WITHOUT ANY WARRANTY; without even the implied warranty of 023// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 024// Lesser General Public License for more details. 025// 026// You should have received a copy of the GNU Lesser General Public 027// License along with this library; if not, write to the Free Software 028// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 029// 030// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com 031// jataylor@hairyfatguy.com 032//------------------------------------------------------------------------------ 033// https://en.wikipedia.org/wiki/Root_element 034 035public class XMLDoc extends XMLBasedDoc<XMLNode> 036{ 037 038 //########################################################################### 039 // CONSTRUCTORS 040 //########################################################################### 041 042 //--------------------------------------------------------------------------- 043 public XMLDoc() 044 { 045 super(); 046 } 047 048 //--------------------------------------------------------------------------- 049 public XMLDoc(XMLTag inRootNode) 050 { 051 super(inRootNode); 052 } 053 054 //--------------------------------------------------------------------------- 055 /** 056 The preferred way to read XML from a file. 057 @param inFile The XML file to read. 058 */ 059 public XMLDoc(File inFile) 060 throws XMLException, IOException 061 { 062 super(inFile); 063 } 064 065 //--------------------------------------------------------------------------- 066 public XMLDoc(BufferedReader inReader) 067 { 068 super(inReader); 069 } 070 071 //--------------------------------------------------------------------------- 072 /** 073 The preferred way to read XML from a stream. 074 */ 075 public XMLDoc(BufferedInputStream inStream) 076 { 077 super(inStream); 078 } 079 080 //########################################################################### 081 // PUBLIC METHODS 082 //########################################################################### 083 084 085 //--------------------------------------------------------------------------- 086 @Override 087 public XMLDoc setName(String inValue) 088 { 089 return (XMLDoc) super.setName(inValue); 090 } 091 092 093 //--------------------------------------------------------------------------- 094 @Override 095 public XMLDoc clone() 096 { 097 return (XMLDoc) super.clone(); 098 } 099 100 //--------------------------------------------------------------------------- 101 @Override 102 public XMLDoc setSpec(XMLSpec inValue) 103 { 104 return (XMLDoc) super.setSpec(inValue); 105 } 106 107 //--------------------------------------------------------------------------- 108 @Override 109 public XMLDoc setEncoding(Charset inValue) 110 { 111 return (XMLDoc) super.setEncoding(inValue); 112 } 113 114 //--------------------------------------------------------------------------- 115 @Override 116 public XMLDoc setIsStandalone(boolean inValue) 117 { 118 return (XMLDoc) super.setIsStandalone(inValue); 119 } 120 121 //-------------------------------------------------------------------------- 122 @Override 123 public XMLDoc setDoctype(Doctype inValue) 124 { 125 return (XMLDoc) super.setDoctype(inValue); 126 } 127}