001    /*
002     * To change this template, choose Tools | Templates
003     * and open the template in the editor.
004     */
005    
006    package org.util.xml.parse.policy;
007    
008    import org.util.xml.element.Element;
009    
010    /**
011     *
012     * @author masaru
013     */
014    public class DefaultParserPolicy implements ParserPolicy {
015        
016        public boolean throwExceptionIfDocumentHasError(){
017            return false;
018        }
019        public boolean checkEndTag() {
020            return false;
021        }
022        public String selectEncoding(String last_tag_key) {
023            return "utf-8";
024        }
025        public boolean forceEmptyTag(String key) {
026            return false;
027        }
028            public ParserPolicy getInnerPolicy(Element element) {
029                    return this;
030            }
031        //public boolean allowTagSize();
032        public Element allowElement(Element element) {
033            return element;
034        }
035        public Element startElement(Element element) {
036            return element;
037        }
038    }