For example, if you specify a section start node and a notebook scope, GetHierarchy returns a null result because a notebook is higher in the node hierarchy than a section. Not all combinations of start node and scope are valid. For each node, the XML string returned provides properties (for example, the section or page title, ID, and last-modified time). The GetHierarchy method returns a string in OneNote 2013 XML format by default or you can set the preferred XML schema version by using the optional xsSchema parameter.ĭepending on the parameters you pass, the GetHierarchy method can return various lists (for example all notebooks, all sections in all notebooks, all pages within a given section, or all pages within a given notebook). NOTE: We recommend specifying a version of OneNote (such as xs2013) instead of using xsCurrent or leaving it blank, because this will allow your add-in to work with future versions of OneNote. You can specify whether you want XML Schema version 2013, 2010, 2007, or the current version. xsSchema – (Optional) The version of the OneNote XML schema, of type XMLSchema, that you want to be output. pbstrHierarchyXmlOut – (Output parameter) A pointer to the string in which you want OneNote to write the XML output. For more information, see the HierarchyScope enumeration in the Enumerations topic. If you specify sections, the method gets only section nodes below the notebook. For example, if you specify pages, the method gets all nodes as far down as the page level. hsScope – The lowest descendant node level you want. If you specify a notebook, section group, or section node, the method gets only descendants of that node. If you pass a null string (""), the method gets all nodes below the root node (that is, all notebooks, section groups, and sections). HRESULT GetHierarchy( BSTR bstrStartNodeID, HierarchyScope hsScope, BSTR * pbstrHierarchyXmlOut, XMLSchema xsSchema) īstrStartNodeID – The node (notebook, section group, or section) whose descendants you want. Gets the notebook node hierarchy structure, starting from the node you specify (all notebooks or a single notebook, section group, or section), and extending downward to all descendants at the level you specify. The methods described in this section enable you to discover, open, modify, close, and delete OneNote notebooks, section groups, and sections. In addition, the Application interface includes a number of properties and events. Navigation – Methods for finding, linking to, and navigating to pages and objects.įunctional – All other methods that perform certain actions or set parameters in OneNote. Page content includes binary objects, such as ink and images, and text objects, such as outlines. Page content – Methods for working with pages and page content, including those for discovering, modifying, saving, and deleting page content. Notebook structure – Methods for working with notebook structure, including those for discovering, opening, modifying, closing, and deleting notebooks, section groups, and sections. The methods are in four general categories: The Application interface includes methods help retrieve, manipulate, and update OneNote information and content.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |