LTTPP / Eemory

An Eclipse plug-in aimed at integrating Evernote within the Eclipse IDE
MIT License
7 stars 0 forks source link

Self-Closing en-note tag result in SAXParserException #30

Closed liujianuuei closed 9 years ago

liujianuuei commented 10 years ago

Parsing fail when root node of ENML is a self-closing node: <en-note ... />.

liujianuuei commented 9 years ago

Verified on 1.0.0-rc.1. It works well as below:

Original ENML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">

<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"/>

Opened ENML(Opening self-closing ENML):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">

<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"></en-note>

Inserted ENML(Updating with new nodes):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">

<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><en-media hash="56c08c25ada9bc23ab9f5ce8c952ee72" type="application/octet-stream"></en-media></div><div><br></br></div></en-note>