Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor and description |
---|
DOMBuilder
(Document document) |
DOMBuilder
(DocumentBuilder documentBuilder) |
Type | Name and description |
---|---|
protected void |
appendNamespaceAttributes(Element element, Map<Object, Object> attributes) |
protected Document |
createDocument() |
protected Object |
createNode(Object name) |
protected Object |
createNode(Object name, Object value) |
protected Object |
createNode(Object name, Map attributes, Object value) |
protected Object |
createNode(Object name, Map attributes) |
static DOMBuilder |
newInstance() |
static DOMBuilder |
newInstance(boolean validating, boolean namespaceAware) |
static Document |
parse(Reader reader) Creates a DocumentBuilder and uses it to parse the XML text read from the given reader. |
static Document |
parse(Reader reader, boolean validating, boolean namespaceAware) Creates a DocumentBuilder and uses it to parse the XML text read from the given reader, allowing parser validation and namespace awareness to be controlled. |
static Document |
parse(Reader reader, boolean validating, boolean namespaceAware, boolean allowDocTypeDeclaration) Creates a DocumentBuilder and uses it to parse the XML text read from the given reader, allowing parser validation, namespace awareness and permission of DOCTYPE declarations to be controlled. |
Document |
parseText(String text) A helper method to parse the given text as XML. |
protected void |
setParent(Object parent, Object child) |
Methods inherited from class | Name |
---|---|
class BuilderSupport |
createNode, createNode, createNode, createNode, doInvokeMethod, getCurrent, getName, invokeMethod, invokeMethod, nodeCompleted, postNodeCompletion, setClosureDelegate, setCurrent, setParent |
class GroovyObjectSupport |
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Creates a DocumentBuilder and uses it to parse the XML text read from the given reader. A non-validating, namespace aware parser which does not allow DOCTYPE declarations is used.
reader
- the reader to read the XML text fromCreates a DocumentBuilder and uses it to parse the XML text read from the given reader, allowing parser validation and namespace awareness to be controlled. Documents are not allowed to contain DOCYTYPE declarations.
reader
- the reader to read the XML text fromvalidating
- whether to validate the XMLnamespaceAware
- whether the parser should be namespace awareCreates a DocumentBuilder and uses it to parse the XML text read from the given reader, allowing parser validation, namespace awareness and permission of DOCTYPE declarations to be controlled.
reader
- the reader to read the XML text fromvalidating
- whether to validate the XMLnamespaceAware
- whether the parser should be namespace awareallowDocTypeDeclaration
- whether the parser should allow DOCTYPE declarationsA helper method to parse the given text as XML.
text
- the XML text to parseCopyright © 2003-2015 The Apache Software Foundation. All rights reserved.