# eric6.Helpviewer.UserAgent.UserAgentReader

Module implementing a class to read user agent data files.

### Global Attributes

None

### Classes

UserAgentReader | Class implementing a reader object for user agent data files.

### Functions

None

## UserAgentReader

Class implementing a reader object for user agent data files.

### Derived from

QXmlStreamReader

### Class Attributes

None

### Class Methods

None

### Methods

UserAgentReader | Constructor
__readUserAgents | Private method to read the user agents data.
__skipUnknownElement | Private method to skip over all unknown elements.
read | Public method to read a user agent file.

### Static Methods

None

#### UserAgentReader (Constructor)

UserAgentReader()

Constructor

#### UserAgentReader.__readUserAgents

__readUserAgents()

Private method to read the user agents data.

#### UserAgentReader.__skipUnknownElement

__skipUnknownElement()

Private method to skip over all unknown elements.

#### UserAgentReader.read

read(fileNameOrDevice)

Public method to read a user agent file.

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

Returns:
  dictionary with user agent data (host as key, agent string as value)

Up