code: @Override
      public Object[][] getAllData() {
          logger.entering();
          Object[][] objectArray;
  
          if ((null == resource.getCls()) && (null != resource.getXpathMap())) {
              Document doc = getDocument();
              Object[][][] multipleObjectDataProviders = new Object[resource.getXpathMap().size()][][];
              int i = 0;
              for (Entry<String, Class<?>> entry : resource.getXpathMap().entrySet()) {
                  String xml = getFilteredXml(doc, entry.getKey());
                  List<?> object = loadDataFromXml(xml, entry.getValue());
                  Object[][] objectDataProvider = DataProviderHelper.convertToObjectArray(object);
                  multipleObjectDataProviders[i++] = objectDataProvider;
              }
              objectArray = DataProviderHelper.getAllDataMultipleArgs(multipleObjectDataProviders);
          } else {
              List<?> objectList = loadDataFromXmlFile();
              objectArray = DataProviderHelper.convertToObjectArray(objectList);
          }
  
          // Passing no arguments to exiting() because implementation to print 2D array could be highly recursive.
          logger.exiting();
          return objectArray;
      }
docs: Generates a two dimensional array for TestNG DataProvider from the XML data.
  
  @return A two dimensional object array.