Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 28 29 package com.caucho.xml; 30 31 import com.caucho.util.FreeList; 32 33 import org.w3c.dom.DOMImplementation ; 34 35 57 public class Xml extends XmlParser { 58 private static FreeList<Xml> _freeList = new FreeList<Xml>(16); 59 60 63 public Xml() 64 { 65 super(new XmlPolicy(), null); 66 67 init(); 68 } 69 70 73 public void init() 74 { 75 super.init(); 76 77 _strictComments = true; 78 _strictAttributes = true; 79 _strictCharacters = true; 80 _strictXml = true; 81 _singleTopElement = true; 82 _optionalTags = false; 83 } 84 85 88 public static Xml create() 89 { 90 Xml xml = _freeList.allocate(); 91 if (xml == null) 92 xml = new Xml(); 93 xml.init(); 94 95 return xml; 96 } 97 98 101 public void free() 102 { 103 _owner = null; 104 _contentHandler = null; 105 _entityResolver = null; 106 _dtdHandler = null; 107 _errorHandler = null; 108 _dtd = null; 109 110 _freeList.free(this); 111 } 112 113 116 static public CauchoDocument createDocument() 117 { 118 return new QDocument(); 119 } 120 121 124 static public DOMImplementation createDOMImplementation() 125 { 126 return new QDOMImplementation(); 127 } 128 } 129
| Popular Tags
|