| | |
Convert history.plist file to XML + SAFARI
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
I don't use Safari but I have it installed (version 3.2.2 (525.28.1)). I took a quick look at history.plist and it looks like valid XML to me. I also changed the file extension to xml and it opened with my xml editor without errors.
Maybe you don't have to do any conversion at all? Have you tried reading it with VB.NET (XmlReader or whatever you want to do with the file)?
Maybe you don't have to do any conversion at all? Have you tried reading it with VB.NET (XmlReader or whatever you want to do with the file)?
Teme64 @ Windows Developer Blog
•
•
Join Date: Mar 2008
Posts: 324
Reputation:
Solved Threads: 7
No frnd bookmarks file is not in XML format......Cz XML file can be raed in simple format...
When i read the history.plist with the above code,it is raeding..But when i raed the Bookmarks.Plist file...It is raeding,but data returned is not correctly..
have a look again at the Boomarks,Plist..Althought u can view the view contents of the file. Plz raed the file U will come to know what i m sayg??
VB.NET Syntax (Toggle Plain Text)
If Dir(sFileName) <> "" Then FileOpen(FileNum, Application.StartupPath & "\" & IGNORE_LIST_PATH, OpenMode.Input, OpenAccess.Read, OpenShare.Shared) Do While Not EOF(FileNum) sInputLine = LineInput(FileNum) Loop End If
When i read the history.plist with the above code,it is raeding..But when i raed the Bookmarks.Plist file...It is raeding,but data returned is not correctly..
have a look again at the Boomarks,Plist..Althought u can view the view contents of the file. Plz raed the file U will come to know what i m sayg??
Worked fine with the following code. Never hit the "breakpoint" lines
I also renamed again bookmarks.plist -> bookmarks.xml and opened it with my xml-editor w/o any problems i.e. the editor marked the content as valid xml.
Have you opened your bookmarks.plist with an hex-editor and checked for "binary" characters (except CR and/or LF chars)? Have you tried to open it with an xml editor? (There are freeware editors in the net if you don't have a suitable editor.)
Also, have you tried to read bookmarks.plist with XmlReader instead as a text file? You can google VB.NET+"how to read xml file" to get sample codes for that.
VB.NET Syntax (Toggle Plain Text)
Dim sFileName As String Dim FileNum As Integer Dim sInputLine As String sFileName = "C:\Documents and Settings\<user>\Application Data\Apple Computer\Safari\bookmarks.plist" FileNum = FreeFile() If Dir(sFileName) <> "" Then Try FileOpen(FileNum, sFileName, OpenMode.Input, OpenAccess.Read, OpenShare.Shared) Catch ex As Exception ex = ex ' Breakpoint line End Try Do While Not EOF(FileNum) Try sInputLine = LineInput(FileNum) Catch ex As Exception ex = ex ' Breakpoint line End Try Loop End If ' Second way If My.Computer.FileSystem.FileExists(sFileName) Then sInputLine = My.Computer.FileSystem.ReadAllText(sFileName) End If
Have you opened your bookmarks.plist with an hex-editor and checked for "binary" characters (except CR and/or LF chars)? Have you tried to open it with an xml editor? (There are freeware editors in the net if you don't have a suitable editor.)
Also, have you tried to read bookmarks.plist with XmlReader instead as a text file? You can google VB.NET+"how to read xml file" to get sample codes for that.
Teme64 @ Windows Developer Blog
![]() |
Similar Threads
- convert .txt file to xml..pls help (VB.NET)
- Convert .wmv video to a file that imovie can recognize? (OS X)
- Convert HTML file into XML using Java (Java)
- VB6 - SQL connection (Visual Basic 4 / 5 / 6)
- read data from an c# file into an XML file (C#)
- Convert MS Word to HTML via File Upload (PHP)
- converting exe into xml (XML, XSLT and XPATH)
- How to COmpare a word file and an XML file (C#)
- problem with convert jumbled text file to unjumbled text file (C)
Other Threads in the VB.NET Forum
- Previous Thread: Can't pass data to control on another form
- Next Thread: How to pass value from datareader to array list
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2005 2008 access account application array arrays basic beginner browser button buttons center checkbox client code convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel fade filter forms ftp generatetags gridview html images inline input insert intel internet lib listview mobile monitor net objects open panel passingparameters pdf picturebox port position print printing problem read remove save searchvb.net select serial settings shutdown soap sorting sqlserver survey table temperature textbox timer timespan transparency trim update user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms wpf wrapingcode year






Bookmarks.plist seems valid XML too...