2011-06-05 93 views
0

我是一個新的Web開發人員,嘗試將一些xml文件加載到JSP中,以便您可以在線查看它們。一個特定的文件是給我了很大的麻煩,我不斷收到此錯誤信息,而且我不確定的下一步該怎麼做itunes幫助XML

的XML頁面無法顯示 使用樣式 表無法查看XML輸入。請更正錯誤並 然後單擊刷新按鈕,或稍後再嘗試 。


系統找不到指定的對象 。錯誤處理資源 的「http://www.apple.com/DTDs/%20%20%20PropertyList-:...

有問題的XML文件下面

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
    "http://www.apple.com/DTDs/ 
    PropertyList-: 1.0.dtd"> 
<?xml-stylesheet href="itunesview.xsl" type="text/xsl"?> 
<plist version="1.0"> 
<dict> 
    <key>Major Version</key><integer>1</integer> 
    <key>Minor Version</key><integer>1</integer> 
    <key>Application Version</key><string>4.9</string> 
    <key>Music Folder</key><string>file://localhost/C:/Documents%20and%20Settings/ 
    Test%20Name/My%20Documents/My%20Music/iTunes/iTunes%20Music/ 
    </string> 
    <key>Library Persistent ID</key><string>45B7F87C7466C64A</string> 
    <key>Tracks</key> 
    <dict> 
    <key>37</key> 
    <dict> 
     <key>Track ID</key><integer>37</integer> 
     <key>Name</key><string>Thinking Of You</string> 
     <key>Artist</key><string>Lenny Kravitz</string> 
     <key>Composer</key><string>Lenny Kravitz/Lysa Trenier</string> 
     <key>Album</key><string>5</string> 
     <key>Genre</key><string>Pop/Funk</string> 
     <key>Kind</key><string>MPEG audio file</string> 
     <key>Size</key><integer>6141310</integer> 
     <key>Total Time</key><integer>383764</integer> 
     <key>Track Number</key><integer>32</integer> 
     <key>Year</key><integer>1998</integer> 
     <key>Date Modified</key><date>2005-06-08T20:04:06Z</date> 
     <key>Date Added</key><date>2004-05-06T04:29:57Z</date> 
     <key>Bit Rate</key><integer>128</integer> 
     <key>Sample Rate</key><integer>44100</integer> 
     <key>Comments</key><string>By ScazzI</string> 
     <key>Play Count</key><integer>6</integer> 
     <key>Play Date</key><integer>-1088231274</integer> 
     <key>Play Date UTC</key><date>2005-08-13T05:00:22Z</date> 
     <key>Track Type</key><string>File</string> 
     <key>Location</key><string>file://localhost/C:/Documents%20and%20Settings/Test%20Name/My%20Documents/My%20Music/Masheed/Lenny%20Kravitz%20-%20Thinking%20Of%20You.mp3/</string> 
     <key>File Folder Count</key><integer>-1</integer> 
     <key>Library Folder Count</key><integer>-1</integer> 
    </dict> 
    <key>132</key> 
     <dict> 
     <key>Track ID</key><integer>132</integer> 
     <key>Name</key><string>Feel Good Inc.</string> 
     <key>Artist</key><string>Gorillaz</string> 
     <key>Album Artist</key><string>Gorillaz</string> 
     <key>Composer</key><string>D. Jolicoeur/Gorillaz</string> 
     <key>Album</key><string>Demon Days</string> 
     <key>Genre</key><string>Electronica</string> 
     <key>Kind</key><string>MPEG audio file</string> 
     <key>Size</key><integer>8904387</integer> 
     <key>Total Time</key><integer>221328</integer> 
     <key>Track Number</key><integer>6</integer> 
     <key>Year</key><integer>2005</integer> 
     <key>Date Modified</key><date>2007-04-09T18:05:07Z</date> 
     <key>Date Added</key><date>2007-08-10T13:41:11Z</date> 
     <key>Bit Rate</key><integer>320</integer> 
     <key>Sample Rate</key><integer>48000</integer> 
     <key>Artwork Count</key><integer>1</integer> 
     <key>Persistent ID</key><string>E71B365F40835349</string> 
     <key>Track Type</key><string>File</string> 
     <key>Location</key><string>file://localhost/D:/Documents%20and%20Settings/James/My%20Documents/My%20Music/My%20Playlists/../Gorillaz/2005.%20Demon%20Days/06.%20Feel%20Good%20Inc..mp3</string> 
     <key>File Folder Count</key><integer>-1</integer> 
     <key>Library Folder Count</key><integer>-1</integer> 
    </dict> 
</dict> 
</plist> 

回答

0

沒見過XML聲明中的DTD - 可能是這個問題。

它必須是之前的所有其他語句

這一行:

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
    "http://www.apple.com/DTDs/ 
    PropertyList-: 1.0.dtd"> 

應該是第一個 - 但DTD URI似乎是無效的 - 最好刪除它 - 它確實沒有好

+0

謝謝!這似乎糾正了這個問題,我現在能夠正確地查看它! – Ian 2011-06-05 17:58:43