Hi,
I’m parsing OneNote notebook - trying to make proper hierarchical folder structure from it.
I noticed that NodeType “Section” is never used because all Sections and Section Groups appear to have “Document” node type.
foreach (var child in notebook.GetChildNodes())
{
switch (child.NodeType)
{
case NodeType.Document: //section or groupsection<span style="color:#569cd6;">break</span>;</pre>Code above get's 4 times in "Document" case, and onetoc2 file have Section, SectionGroup, Empty Section without page. last part is a OneNote Rubbish Bin - which I understand is an artificial section with erased objects which is fine.</div><div><br></div><div>Second issue is with real type shown in debug mode... Section is a "document type" and section group is a "notebook" type. </div><div><br></div><div>[ please see attached file ] </div><div><br></div><div>How can I tell the difference between Section, Section Group and Notebook from code when parsing structure ?<br><br>I've also attached 7zipped notebook for test example.</div><div><br></div><div>Thanks in advance.</div>