前回JSとcanvasで縦組みエンジンを作ろう( ・∀・) その3 - Webと文字はサンプルのスクリーンショットを貼りました。今回はその解説です。 GAEで作成したアプリ:ギコ文庫 ギコ文庫:http://gikobunko.appspot.com/ Beautiful Soup JSとcanvasで縦組みエンジンを作ろう( ・∀・) その2 - Webと文字ではminidomを使用してhtmlの解析を行いましたが、今回からそれをやめてbeautiful soup(参考資料1)を使用します。理由は、minidomの解析時間です。 XMLの論考: PythonにおけるElementTreeのXMLプロセス(参考資料2) xml.minidomは、適度な大きさを超えるようなXML文書の処理には向いていないということが明らかになりました。その他は(公正に見て)適切な結果になっています。 参考資