Hi .. I cannot get jTidy lib to parse a downloaded HTML file to XML.
I have had success on a small web page generated by me and located on my host server and also a small html file in Assets folder..
but all other attemps result in empty XML file .
What am I doing wrong.
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The sax.Parse line errors ...org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: no element found
Many thanks and Regards
			
			I have had success on a small web page generated by me and located on my host server and also a small html file in Assets folder..
but all other attemps result in empty XML file .
What am I doing wrong.
			
				B4X:
			
		
		
		Sub GetData 
    Okhc.Initialize("Okhc")
    req.InitializeGet("https://www.b4x.com/android/forum/")
    Okhc.Execute(req, 1) 
End Sub
Sub Okhc_ResponseSuccess (Response As OkHttpResponse, TaskId As Int)
        Response.GetAsynchronously("GetHTML", File.OpenOutput(File.DirDefaultExternal, "page.html", False), True, TaskId)     
End Sub
Sub GetHTML_StreamFinish (Success As Boolean, TaskId As Int)      
    tid.Initialize
    tid.Parse(File.OpenInput(File.DirDefaultExternal, "page.html"), File.DirDefaultExternal, "data.xml")
    sax.Initialize
    sax.Parse(File.OpenInput(File.DirDefaultExternal, "data.xml"), "sax")
End SubThe sax.Parse line errors ...org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: no element found
Many thanks and Regards
 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		