org.eclipse.oomph.util

## Class XMLUtil

- java.lang.Object
- - org.eclipse.oomph.util.XMLUtil

-     public final class XMLUtil
      extends Object

  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `XMLUtil.ElementHandler`
    `static class` | `XMLUtil.ElementUpdater`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DocumentBuilder` | `createDocumentBuilder()`
    `static int` | `handleChildElements(Element rootElement, XMLUtil.ElementHandler handler)`
    `static int` | `handleElements(NodeList nodeList, XMLUtil.ElementHandler handler)`
    `static int` | `handleElementsByTagName(Element rootElement, String tagName, XMLUtil.ElementHandler handler)`
    `static Document` | `loadDocument(DocumentBuilder documentBuilder, File file)`
    `static Document` | `loadDocument(DocumentBuilder documentBuilder, InputStream inputStream)`
    `static Element` | `loadRootElement(DocumentBuilder documentBuilder, File file)`
    `static Element` | `loadRootElement(DocumentBuilder documentBuilder, InputStream inputStream)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createDocumentBuilder

          public static DocumentBuilder createDocumentBuilder()
                                                       throws ParserConfigurationException

      Throws:
        `ParserConfigurationException`

    - #### loadDocument

          public static Document loadDocument(DocumentBuilder documentBuilder,
                              InputStream inputStream)
                                       throws SAXException,
                                              IOException

      Throws:
        `SAXException`
        `IOException`

    - #### loadDocument

          public static Document loadDocument(DocumentBuilder documentBuilder,
                              File file)
                                       throws SAXException,
                                              IOException

      Throws:
        `SAXException`
        `IOException`

    - #### loadRootElement

          public static Element loadRootElement(DocumentBuilder documentBuilder,
                                InputStream inputStream)
                                         throws Exception

      Throws:
        `Exception`

    - #### loadRootElement

          public static Element loadRootElement(DocumentBuilder documentBuilder,
                                File file)
                                         throws Exception

      Throws:
        `Exception`

    - #### handleElements

          public static int handleElements(NodeList nodeList,
                           XMLUtil.ElementHandler handler)
                                    throws Exception

      Throws:
        `Exception`

    - #### handleChildElements

          public static int handleChildElements(Element rootElement,
                                XMLUtil.ElementHandler handler)
                                         throws Exception

      Throws:
        `Exception`

    - #### handleElementsByTagName

          public static int handleElementsByTagName(Element rootElement,
                                    String tagName,
                                    XMLUtil.ElementHandler handler)
                                             throws Exception

      Throws:
        `Exception`

Copyright (c) 2014 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v20.html