code: @Override
      public Object[][] getAllKeyValueData() {
          logger.entering();
  
          Object[][] objectArray;
          try {
              JAXBContext context = JAXBContext.newInstance(resource.getCls());
              Unmarshaller unmarshaller = context.createUnmarshaller();
              StreamSource xmlStreamSource = new StreamSource(resource.getInputStream());
              Map<String, KeyValuePair> keyValueItems = unmarshaller
                      .unmarshal(xmlStreamSource, KeyValueMap.class).getValue().getMap();
              objectArray = DataProviderHelper.convertToObjectArray(keyValueItems);
          } catch (JAXBException excp) {
              throw new DataProviderException("Error unmarshalling XML file.", excp);
          }
  
          // 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 representing a map of name value
  collection.
  
  This method needs the referenced {@link DataResource} to be instantiated using its constructors with
  parameter {@code Class<?> cls} and set to {@code KeyValueMap.class}. The implementation in this method is tightly
  coupled with {@link KeyValueMap} and {@link KeyValuePair}.
  
  The hierarchy and name of the nodes are strictly as instructed. A name value pair should be represented as nodes
  'key' and 'value' as child nodes contained in a parent node named 'item'. A sample data with proper tag names is
  shown here as an example:
  
  <pre>
  <items>
  <item>
  <key>k1</key>
  <value>val1</value>
  </item>
  <item>
  <key>k2</key>
  <value>val2</value>
  </item>
  <item>
  <key>k3</key>
  <value>val3</value>
  </item>
  </items>
  </pre>
  
  @return A two dimensional object array.