数据解析

目前支持json,xml,html,url-query四种格式的数据快速解析

  1. [$json, $xml, $html] = SaberGM::list([
  2. 'uri' => [
  3. 'http://httpbin.org/get',
  4. 'http://www.w3school.com.cn/example/xmle/note.xml',
  5. 'http://httpbin.org/html'
  6. ]
  7. ]);
  8. var_dump($json->getParsedJsonArray());
  9. var_dump($json->getParsedJsonObject());
  10. var_dump($xml->getParsedXmlArray());
  11. var_dump($xml->getParsedXmlObject(true));
  12. var_dump($html->getParsedDomObject()->getElementsByTagName('h1')->item(0)->textContent);