I am trying to pull information from a onenote notebook. The only way I've found to be able to is to get the hierarchy of the notebook, then pull all the attributes so I can use them to pull the actual content of a page. Following is an example of the XML document.

```
<?xml version="1.0"?>
<one:Notebooks xmlns:one="http://schemas.microsoft.com/office/onenote/2013/onenote">
    <one:Notebook name="Notebook" nickname="Notebook" ID="**********" path="**********" lastModifiedTime="**********" color="**********">
        <one:Section name="**********" ID="**********" path="**********" lastModifiedTime="**********" color="**********">
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="1"/>
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="2"/>
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="1"/>
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="2"/>
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="2"/>
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="2"/>
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="1"/>
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="2"/>
            <one:Page ID="**********" name="**********" dateTime="**********" lastModifiedTime="**********" pageLevel="2"/>
        </one:Section>
    </one:Notebook>
</one:Notebooks>

```

I was able to pull the attributes by using the following:

```
Dim oneNote = New OneNote.Application()
oneNote.GetHierarchy(Nothing, Microsoft.Office.Interop.OneNote.HierarchyScope.hsPages, strXML)
        Dim xdoc As New XmlDocument()
        xdoc.LoadXml(strXML)
    For Each Element As XmlElement In xdoc.SelectNodes("//*")
        TextBox1.Text = TextBox1.Text & "Processing element with name: " & Element.Name & Environment.NewLine
        For Each Attribute As XmlAttribute In Element.Attributes
            TextBox1.Text = TextBox1.Text & Convert.ToChar(Keys.Tab) & Attribute.Name & ": " & Attribute.Value & Environment.NewLine
        Next
        TextBox1.Text = TextBox1.Text & Environment.NewLine
    Next

```

However when I try to pull specific attributes by name it comes back with a namespace error.

```
For Each node As XmlNode In xdoc.DocumentElement.SelectNodes("//one:Notebooks/one:Notebook/one:Section")
    TextBox1.Text = TextBox1.Text & node.Attributes.ItemOf("name").InnerText & Environment.NewLine
Next

```

I would like to be able to create a string array with the name of the section, the name of the page, the ID of the page, and the page level. Any help would be much appreciated.