I understand the analysis xml, I use for this purpose XMLPullParser
. As an example, I decided to look into the fb2 file and write a reader. File format is described here .
In principle, it is possible to analyze the file, but several questions arise:
If, for example, you copy the file 1.fb2 to the folder raw \ xml, the studio swears that the file should be. extension * .xml. Why? Can I somehow work with xml-th structure files using XMLPullParser?
The fb2 file has to be edited before analyzing.
<?xml version="1.0" encoding="windows-1251"?><FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
I had to remove xmlns="http://www.gribuser.ru/xml/fictionbook/2.0"
and change the encoding to UTF-8. After that, xml-fb2 "got bored" can someone be able to comment
PS Parser settings ( FEATURE_VALIDATION
, FEATURE_PROCESS_DOCDECL
) looked, but they didn’t help me, maybe they didn’t get it right with them