Qt 4.8
Public Functions | List of all members
QXmlLocator Class Referenceabstract

The QXmlLocator class provides the XML handler classes with information about the parsing position within a file. More...

#include <qxml.h>

Inheritance diagram for QXmlLocator:
QXmlSimpleReaderLocator

Public Functions

virtual int columnNumber () const =0
 Returns the column number (starting at 1) or -1 if there is no column number available. More...
 
virtual int lineNumber () const =0
 Returns the line number (starting at 1) or -1 if there is no line number available. More...
 
 QXmlLocator ()
 Constructor. More...
 
virtual ~QXmlLocator ()
 Destructor. More...
 

Detailed Description

The QXmlLocator class provides the XML handler classes with information about the parsing position within a file.

Note
This class or function is reentrant.
Attention
Module: QtXml

The reader reports a QXmlLocator to the content handler before it starts to parse the document. This is done with the QXmlContentHandler::setDocumentLocator() function. The handler classes can now use this locator to get the position (lineNumber() and columnNumber()) that the reader has reached.

Definition at line 285 of file qxml.h.

Constructors and Destructors

◆ QXmlLocator()

QXmlLocator::QXmlLocator ( )

Constructor.

Definition at line 658 of file qxml.cpp.

659 {
660 }

◆ ~QXmlLocator()

QXmlLocator::~QXmlLocator ( )
virtual

Destructor.

Definition at line 665 of file qxml.cpp.

666 {
667 }

Functions

◆ columnNumber()

int QXmlLocator::columnNumber ( ) const
pure virtual

Returns the column number (starting at 1) or -1 if there is no column number available.

Implemented in QXmlSimpleReaderLocator.

Referenced by QDomHandler::characters(), QDomHandler::comment(), QDomHandler::processingInstruction(), QDomHandler::skippedEntity(), and QDomHandler::startElement().

◆ lineNumber()

int QXmlLocator::lineNumber ( ) const
pure virtual

Returns the line number (starting at 1) or -1 if there is no line number available.

Implemented in QXmlSimpleReaderLocator.

Referenced by QDomHandler::characters(), QDomHandler::comment(), QDomHandler::processingInstruction(), QDomHandler::skippedEntity(), and QDomHandler::startElement().


The documentation for this class was generated from the following files: