EnglishDeutschFrançais

2.8 Why is a SAXParseException thrown, when rendering HTML documents exported from Microsoft Word?

Microsoft Word HTML documents contain namespaces, which raise a SAXParseException. In order to render such documents correctly, the following code must be added to the document:

1. Add namespace definition for the namespace prefixes for the according elements, e.g. for <o:p> and <v:x> elements:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="de">

2. Add these styles to your CSS in order to hide certain elements, e.g. for <o:p> and <v:x> elements (this step is optional):

@namespace o "urn:schemas-microsoft-com:office:office";

@namespace v "urn:schemas-microsoft-com:vml";

o|* { display: none }

v|* { display: none }

Overview of Office 2003 namespaces:

  • xmlns:o="urn:schemas-microsoft-com:office:office"
  • xmlns:x="urn:schemas-microsoft-com:office:excel"
  • xmlns:v="urn:schemas-microsoft-com:vml"
  • xmlns:rs="urn:schemas-microsoft-com:rowset"
  • xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
  • xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet"

Copyright © 2000-2008 RealObjects GmbH