OneNote API broken?

A

Alex

Hi there,

I've tried to create a new notebook, new section and new page in onenote
using a C# program I've created. So far so good - and the next step is to
name the Page (The notebook and section get named so that's all good).

When I go to enter a page title I get the page content, using code from the
demo code that came with the video. It puts the XML in a holder,
selectsinglenode that refers to the title, and edits the title. I've output
my input to the console window to make sure it's all good, and as far as i
can tell it is!

When I go to change the page title however:

try
{
onApp.UpdatePageContent(xmlElement.InnerXml,
System.DateTime.MinValue);
}
catch (NullReferenceException e)
{
System.Console.WriteLine("Error: " + e);
}

this line seems to return: HRESULT: 0x80042000. I looked it up and came back
with a Malformed XML but I can't seem to figure out why! Anybody got any
ideas?

TIA!
 
I

Ilya Koulchin

Alex said:
this line seems to return: HRESULT: 0x80042000. I looked it up and came back
with a Malformed XML but I can't seem to figure out why!

Probably because your XML is malformed. I can't really say more without
looking at the exact string that you're trying to import. You can also
take the XML you're trying to import and run it through an XML
validator, which might point out additional problems.

Ilya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top