| java.lang.Object org.apache.lucene.xmlparser.DOMUtils
DOMUtils | public class DOMUtils (Code) | | 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.
|
Method Summary | |
public static String | getAttribute(Element element, String attributeName, String deflt) | public static float | getAttribute(Element element, String attributeName, float deflt) | public static int | getAttribute(Element element, String attributeName, int deflt) | public static boolean | getAttribute(Element element, String attributeName, boolean deflt) | public static String | getAttributeOrFail(Element e, String name) | public static String | getAttributeWithInheritance(Element element, String attributeName) | public static String | getAttributeWithInheritanceOrFail(Element e, String name) | public static Element | getChildByTagName(Element e, String name) | public static Element | getChildByTagOrFail(Element e, String name) | public static String | getChildTextByTagName(Element e, String tagName) | public static Element | getFirstChildElement(Element element) | public static Element | getFirstChildOrFail(Element e) | public static String | getNonBlankTextOrFail(Element e) | public static String | getText(Node e) | public static Element | insertChild(Element parent, String tagName, String text) | public static Document | loadXML(Reader is) Helper method to parse an XML file into a DOM tree, given a reader. |
getAttribute | public static float getAttribute(Element element, String attributeName, float deflt)(Code) | | |
getAttribute | public static int getAttribute(Element element, String attributeName, int deflt)(Code) | | |
getAttribute | public static boolean getAttribute(Element element, String attributeName, boolean deflt)(Code) | | |
getAttributeWithInheritance | public static String getAttributeWithInheritance(Element element, String attributeName)(Code) | | Returns an attribute value from this node, or first parent node with this attribute defined
Parameters: element - Parameters: attributeName - A non-zero-length value if defined, otherwise null |
loadXML | public static Document loadXML(Reader is)(Code) | | Helper method to parse an XML file into a DOM tree, given a reader.
Parameters: is - reader of the XML file to be parsed an org.w3c.dom.Document object |
|
|