code: public static Map<String, Filesystem> getFilesystems(Document domainXml) {
          Map<String, Filesystem> ret = new HashMap<>();
          XPathFactory xpf = XPathFactory.instance();
          XPathExpression<Element> fsExpr = xpf.compile(XPATH_FILESYSTEM, Filters.element());
          List<Element> filesystems = fsExpr.evaluate(domainXml);
          for (Element fs : filesystems) {
              Attribute accessMode = fs.getAttribute("accessmode");
              String source = fs.getChild("source").getAttribute("dir").getValue();
              String target = fs.getChild("target").getAttribute("dir").getValue();
              boolean readOnly = fs.getChild("readonly") != null;
  
              ret.put(target, new Filesystem(source, target, AccessMode.valueOf(accessMode.getValue().toUpperCase(Locale.US)), readOnly));
          }
          return ret;
      }
docs: Get map of {@link Filesystem}s. The key in the map is the target inside the domain. This will only return
  filesystems of type 'mount'.