code: public static StreamingOutput buildDOMResponse(final List<String> availableResources) {
  
          try {
              final Document document = createSurroundingXMLResp();
              final Element resElement = createResultElement(document);
  
              final List<Element> resources = createCollectionElement(availableResources, document);
              for (final Element resource : resources) {
                  resElement.appendChild(resource);
              }
              document.appendChild(resElement);
              return createStream(document);
          } catch (final ParserConfigurationException exc) {
              throw new JaxRxException(exc);
          }
      }
docs: Builds a DOM response.
  
  @param availableResources
  list of resources to include in the output
  @return streaming output