Class XMLOutputUtil

java.lang.Object
edu.umd.cs.findbugs.xml.XMLOutputUtil

public abstract class XMLOutputUtil extends Object
Utility routines for writing to XMLOutput.
Author:
David Hovemeyer
See Also:
  • Constructor Details

    • XMLOutputUtil

      public XMLOutputUtil()
  • Method Details

    • writeElementList

      public static void writeElementList(XMLOutput xmlOutput, String tagName, Iterable<String> listValues) throws IOException
      Write a list of Strings to document as elements with given tag name.
      Parameters:
      xmlOutput - the XMLOutput object to write to
      tagName - the tag name
      listValues - Collection of String values to write
      Throws:
      IOException
    • writeElementList

      public static void writeElementList(XMLOutput xmlOutput, String tagName, Iterator<String> listValueIterator) throws IOException
      Write a list of Strings to document as elements with given tag name.
      Parameters:
      xmlOutput - the XMLOutput object to write to
      tagName - the tag name
      listValueIterator - Iterator over String values to write
      Throws:
      IOException
    • writeFileList

      public static void writeFileList(XMLOutput xmlOutput, String tagName, Iterable<File> listValues) throws IOException
      Write a list of Strings to document as elements with given tag name.
      Parameters:
      xmlOutput - the XMLOutput object to write to
      tagName - the tag name
      listValues - Collection of String values to write
      Throws:
      IOException
    • writeFileList

      public static void writeFileList(XMLOutput xmlOutput, String tagName, Iterator<File> listValueIterator) throws IOException
      Write a list of Strings to document as elements with given tag name.
      Parameters:
      xmlOutput - the XMLOutput object to write to
      tagName - the tag name
      listValueIterator - Iterator over String values to write
      Throws:
      IOException
    • writeCollection

      public static void writeCollection(XMLOutput xmlOutput, Collection<? extends XMLWriteable> collection) throws IOException
      Write a Collection of XMLWriteable objects.
      Parameters:
      xmlOutput - the XMLOutput object to write to
      collection - Collection of XMLWriteable objects
      Throws:
      IOException