# eric4.Helpviewer.Bookmarks.XbelReader

Module implementing a class to read XBEL bookmark files.

### Global Attributes

None

### Classes

XbelReader | Class implementing a reader object for XBEL bookmark files.
XmlEntityResolver | Class implementing an XML entity resolver for bookmark files.

### Functions

None

## XbelReader

Class implementing a reader object for XBEL bookmark files.

### Derived from

QXmlStreamReader

### Class Attributes

None

### Class Methods

None

### Methods

XbelReader | Constructor
__readBookmarkNode | Private method to read and parse a bookmark subtree.
__readDescription | Private method to read the desc element.
__readFolder | Private method to read and parse a folder subtree.
__readSeparator | Private method to read a separator element.
__readTitle | Private method to read the title element.
__readXBEL | Private method to read and parse the XBEL file.
__skipUnknownElement | Private method to skip over all unknown elements.
read | Public method to read an XBEL bookmark file.

### Static Methods

None

#### XbelReader (Constructor)

XbelReader()

Constructor

#### XbelReader.__readBookmarkNode

__readBookmarkNode(node)

Private method to read and parse a bookmark subtree.

node
  reference to the node to attach to (BookmarkNode)

#### XbelReader.__readDescription

__readDescription(node)

Private method to read the desc element.

node
  reference to the bookmark node desc belongs to (BookmarkNode)

#### XbelReader.__readFolder

__readFolder(node)

Private method to read and parse a folder subtree.

node
  reference to the node to attach to (BookmarkNode)

#### XbelReader.__readSeparator

__readSeparator(node)

Private method to read a separator element.

node
  reference to the bookmark node the separator belongs to (BookmarkNode)

#### XbelReader.__readTitle

__readTitle(node)

Private method to read the title element.

node
  reference to the bookmark node title belongs to (BookmarkNode)

#### XbelReader.__readXBEL

__readXBEL(node)

Private method to read and parse the XBEL file.

node
  reference to the node to attach to (BookmarkNode)

#### XbelReader.__skipUnknownElement

__skipUnknownElement()

Private method to skip over all unknown elements.

#### XbelReader.read

read(fileNameOrDevice)

Public method to read an XBEL bookmark file.

fileNameOrDevice
  name of the file to read (string or QString) or reference to the device to read (QIODevice)

Returns:
  reference to the root node (BookmarkNode)

Up

## XmlEntityResolver

Class implementing an XML entity resolver for bookmark files.

### Derived from

QXmlStreamEntityResolver

### Class Attributes

None

### Class Methods

None

### Methods

resolveUndeclaredEntity | Public method to resolve undeclared entities.

### Static Methods

None

#### XmlEntityResolver.resolveUndeclaredEntity

resolveUndeclaredEntity(entity)

Public method to resolve undeclared entities.

entity
  entity to be resolved (string or QString)

Returns:
  resolved entity (QString)

Up