我一直尝试使用其他方法从HTML表中提取数据,例如使用xpath。该表不包含任何类,因此我不确定如何在没有类或ID的情况下使用xpath。正在从rss xml文件中检索此数据。我目前正在使用DOM。提取数据后,我将尝试按职位对表格进行排序
这是我的PHP代码
$html='';
$xml= simplexml_load_file($url) or die("ERROR: Cannot connect to url\n check if report still exist in the Gradleaders system");
/*What we do here in this loop is retrieve all content inside the encoded content,
*which includes the CDATA information. This is where the HTML and styling is included.
*/
foreach($xml->channel->item as $cont){
$html=''.$cont->children('content',true)->encoded.'<br>'; //actual tag name is encoded
}
$htmlParser= new DOMDocument(); //to parse html using DOMDocument
libxml_use_internal_errors(true); // your HTML gives parser warnings, keep them internal
$htmlParser->loadHTML($html); …Run Code Online (Sandbox Code Playgroud) 所以我很难找到我的代码中哪里出了问题。我正在构建音频播放器。该功能无法找到我的设备中除2个文件以外的所有音频文件。我认为问题可能出在我的歌曲定位算法findSongs中。
这是我的日志猫:
03-17 15:29:24.492 20066-20066/? I/SELinux? Function: selinux_android_load_priority , priority [3] , priority version is VE=SEPF_SGH-M919_4.4.4_0048
03-17 15:29:24.492 20066-20066/? E/dalvikvm? >>>>> Normal User
03-17 15:29:24.492 20066-20066/? E/dalvikvm? >>>>> com.example.joe.audiodomain [ userId:0 | appId:10237 ]
03-17 15:29:24.492 20066-20066/? D/dalvikvm? Late-enabling CheckJNI
03-17 15:29:24.632 20066-20066/? W/dalvikvm? VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
03-17 15:29:24.632 20066-20066/? I/dalvikvm? Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
03-17 15:29:24.632 20066-20066/? W/dalvikvm? VFY: unable to resolve interface method 15027: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
03-17 …Run Code Online (Sandbox Code Playgroud)