# eric6.Helpviewer.Bookmarks.NsHtmlWriter

Module implementing a class to write Netscape HTML bookmark files.

### Global Attributes

None

### Classes

NsHtmlWriter | Class implementing a writer object to generate Netscape HTML bookmark files.

### Functions

None

## NsHtmlWriter

Class implementing a writer object to generate Netscape HTML bookmark files.

### Derived from

QObject

### Class Attributes

indentSize

### Class Methods

None

### Methods

NsHtmlWriter | Constructor
__write | Private method to write an Netscape HTML bookmark file.
__writeBookmark | Private method to write a bookmark node.
__writeFolder | Private method to write a bookmark node.
__writeItem | Private method to write an entry for a node.
__writeSeparator | Private method to write a separator.
write | Public method to write an Netscape HTML bookmark file.

### Static Methods

None

#### NsHtmlWriter (Constructor)

NsHtmlWriter()

Constructor

#### NsHtmlWriter.__write

__write(root)

Private method to write an Netscape HTML bookmark file.

root
  root node of the bookmark tree (BookmarkNode)

Returns:
  flag indicating success (boolean)

#### NsHtmlWriter.__writeBookmark

__writeBookmark(node, indent)

Private method to write a bookmark node.

node
  reference to the node to be written (BookmarkNode)
indent
  size of the indentation (integer)

#### NsHtmlWriter.__writeFolder

__writeFolder(node, indent)

Private method to write a bookmark node.

node
  reference to the node to be written (BookmarkNode)
indent
  size of the indentation (integer)

#### NsHtmlWriter.__writeItem

__writeItem(node, indent)

Private method to write an entry for a node.

node
  reference to the node to be written (BookmarkNode)
indent
  size of the indentation (integer)

#### NsHtmlWriter.__writeSeparator

__writeSeparator(indent)

Private method to write a separator.

indent
  size of the indentation (integer)

#### NsHtmlWriter.write

write(fileNameOrDevice, root)

Public method to write an Netscape HTML bookmark file.

fileNameOrDevice
  name of the file to write (string) or device to write to (QIODevice)
root
  root node of the bookmark tree (BookmarkNode)

Returns:
  flag indicating success (boolean)

Up