View Michael Scherotter's profile on LinkedIn

Browse by Tags

OneNote XML uses CDATA for HTML
06 July 07 10:51 AM | Synergist | 2 Comments   

If you look at the XML generated by the OneNote 2007 API, you will notice that the text outline sections are all escaped with CDATA[] elements.  This, in my opinion is bad form.  I am working on transforming the OneNote XML to Silverlight XAML using XSLT and having that portion of the XML escaped makes it more difficult to parse and transform.  My guess is that it's like this because much of the HTML is copied from web browsers and HTML is not always well-formed XML (XHTML is).  Coming from MindManager that always used well-formed XHTML for note in the XML, I would like much more usable XML from OneNote 2007. 

Instead of this:

<one:OE creationTime="2006-01-25T02:41:25.000Z" lastModifiedTime="2006-03-02T22:01:00.000Z" objectID="{B64DE6F4-60DB-0E93-07D6-DBBDCDBF80A3}{77}{B0}" alignment="left">

<one:T>

<![CDATA[In addition to features covered in the <a

href="onenote:Getting%20Started%20with%20OneNote.one">Getting started</a> section, OneNote has additional tools that can help you in several activities. <span

style='font-weight:bold'>Click these links</span> to explore. Use the <span

style='font-weight:bold'>Back arrow button</span> on the toolbar to return to this page:]]>

</one:T>

</one:OE>

Use this:

<one:OE creationTime="2006-01-25T02:41:25.000Z" lastModifiedTime="2006-03-02T22:01:00.000Z" objectID="{B64DE6F4-60DB-0E93-07D6-DBBDCDBF80A3}{77}{B0}" alignment="left">

<one:T>

In addition to features covered in the <a

href="onenote:Getting%20Started%20with%20OneNote.one">Getting started</a> section, OneNote has additional tools that can help you in several activities. <span

style='font-weight:bold'>Click these links</span> to explore. Use the <span

style='font-weight:bold'>Back arrow button</span> on the toolbar to return to this page:

</one:T>

</one:OE>

Here are two questions:

  1. Is the HTML in OneNote 2007's CDATA sections well-formed XML?
  2. Does anyone have any cool tricks to convert non-well-formed HTML to well-formed XHTML?

Search

Go

This Blog

Tags

Archives

Links

Syndication