PROBLEM:
If an ebook filename contains an ampersand character, the resulting XML file
generated from epubcheck 3.0 is not valid.
METHOD:
What steps will reproduce the problem?
0. Assume you have an ebook called 'T:\Calibre\James Patterson\Hide & Seek
(1196)\Hide & Seek - James Patterson.epub'. Any ebook with an '&' in the
filename will do.
1. In console enter: java -jar
"Q:\Data\Clients\TE\TEEBook\TEBatchEpub\bin\Debug\epubcheck-3.0.jar" -out
"C:\Users\Admin\AppData\Local\Temp\TEEpubCheck\Hide & Seek - James Patterson
[FD-AD-BF-FB-4A-7F-FC-2A-C8-23-C7-0E-18-94-30-37-05-B7-6D-76].xml"
"T:\Calibre\James Patterson\Hide & Seek (1196)\Hide & Seek - James
Patterson.epub"
2. Examine resulting C:\Users\Admin\AppData\Local\Temp\TEEpubCheck\Hide & Seek
- James Patterson
[FD-AD-BF-FB-4A-7F-FC-2A-C8-23-C7-0E-18-94-30-37-05-B7-6D-76].xml file.
RESULT:
The XML file generated:
...
<repInfo uri="Hide & Seek - James Patterson.epub">
...
Visual Studio 2010 vb.net code can't parse it without an error:
Dim lobjXmlDocument As XPathDocument
Me.clear()
Try
lobjXmlDocument = New XPathDocument(mFullFileName) <- Error
Catch ex As Exception
mErrorString = ex.Message
Return False
End Try
EXPECTED:
...
<repInfo uri="Hide & Seek - James Patterson.epub">
...
PLATFORM:
MS Windows 7, EpubCheck 3.0, from the console.
Original issue reported on code.google.com by edarksw...@gmail.com on 25 Jan 2013 at 5:38
Original issue reported on code.google.com by
edarksw...@gmail.com
on 25 Jan 2013 at 5:38