private static Element infoAsElement(Document doc,LibraryInfo info){
  Element libraryElement=doc.createElement("libraryInfo");
  libraryElement.setAttribute("version",info.getVersion());
  appendPathElements(doc,"bootpath",libraryElement,info.getBootpath());
  appendPathElements(doc,"extensionDirs",libraryElement,info.getExtensionDirs());
  appendPathElements(doc,"endorsedDirs",libraryElement,info.getEndorsedDirs());
  return libraryElement;
}

private static Element infoAsElement ( Document doc , LibraryInfo info ) { Element libraryElement = doc . createElement ( "libraryInfo" ) ; libraryElement . setAttribute ( "version" , info . getVersion ( ) ) ; appendPathElements ( doc , "bootpath" , libraryElement , info . getBootpath ( ) ) ; appendPathElements ( doc , "extensionDirs" , libraryElement , info . getExtensionDirs ( ) ) ; appendPathElements ( doc , "endorsedDirs" , libraryElement , info . getEndorsedDirs ( ) ) ; return libraryElement ; }
creates an xml element for the given info .
