code: @Override
      public Object[][] getDataByKeys(String[] keys) {
          logger.entering(Arrays.toString(keys));
          if (null == resource.getCls()) {
              resource.setCls(KeyValueMap.class);
          }
  
          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.getDataByKeys(keyValueItems, keys);
          } catch (JAXBException excp) {
              logger.exiting(excp.getMessage());
              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 filtered by keys.
  
  A name value item should use the node name 'item' and a specific child structure since the implementation depends
  on {@link KeyValuePair} class. The structure of an item in collection is shown below where 'key' and 'value' are
  child nodes contained in a parent node named 'item':
  
  <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>
  
  @param keys
  The string keys to filter the data.
  @return A two dimensional object array.