2016-09-15 9 views
0

jsonをxmlに解析して結果を取得しますが、xmlフィードが私のサーバーに結果を表示していません。誰もが私にいくつかのアイデアをチェックしてくれますか?ダッシュボードにXML結果を表示する必要があります。実際のURLはこちら(http://imodelicon.com/pinkertan/test/convertjson.xmlJSONからXMLを解析します

XMLスクリプトをRSS形式にも編集しますが、後で内容はありません。

おかげで、

<?xml version="1.0" encoding="UTF-8"?> 
-<root> 
-<data> 
<message>This summer both Stephen Curry & Kevin Durant toured Asia, 
connecting with fans & inspiring young athletes. »  
http://on.nba.com/2bWpo3L » http://on.nba.com/29LfO6X</message> 

<story>Golden State Warriors added 4 new photos.</story> 

<created_time>2016-09-15T01:03:28+0000</created_time> 

<id>47657117525_10154616463827526</id> 

</data> 
-<data> 

<message>The worlds of sports & tech came together once again as Stephen 
Curry attended TechCrunch Disrupt in San Francisco. #TCDisrupt</message> 

<created_time>2016-09-14T23:21:38+0000</created_time> 

<id>47657117525_10154616220367526</id> 

</data> 
-<data> 

<message>All Summer 16. #DubNation</message> 

<created_time>2016-09-14T18:42:15+0000</created_time> 

<id>47657117525_10154615411837526</id> 

</data> 
-<data> 

<message></message> 

<story>Golden State Warriors shared Draymond Green's photo.</story> 

<created_time>2016-09-14T18:29:31+0000</created_time> 

<id>47657117525_10154615388222526</id> 

</data> 
-<data> 

<message>Single game tickets are now available for Warriors Insiders! »  
http://on.nba.com/17O7eLP</message> 

<created_time>2016-09-14T17:10:00+0000</created_time> 

<id>47657117525_10154613058837526</id> 

</data> 
-<data> 

<message>Signs that training camp is almost here... </message> 

<story>Golden State Warriors added 2 new photos.</story> 

<created_time>2016-09-14T01:41:40+0000</created_time> 

<id>47657117525_10154613158592526</id> 

</data> 

-<paging> 
<previous>https://graph.facebook.com/v2.7/47657117525/feed? 
access_token.......</previous> 
<next>https://graph.facebook.com/v2.7/47657117525/feed? 
access_token=......</next> 
</paging> 
</root> 

答えて

0

余分な-文字が第2レベルの各タグの前だけでなく、root要素の前にあります。

前者は問題ではありませんが(検証の観点を除いて)、文書要素の外側にテキストが許可されていないため、後者は文書を整形しません。

+0

申し訳ありませんが、誤字かもしれません。リンクをチェックすると、無関係な " - "が実際に消えてしまいます。その他の提案はありますか? – Peterlu12

関連する問題