Qt 4.8
Public Functions | Public Variables | Properties | List of all members
QDomHandler Class Reference
Inheritance diagram for QDomHandler:
QXmlDefaultHandler QXmlContentHandler QXmlErrorHandler QXmlDTDHandler QXmlEntityResolver QXmlLexicalHandler QXmlDeclHandler

Public Functions

bool characters (const QString &ch)
 The reader calls this function when it has parsed a chunk of character data (either normal character data or character data inside a CDATA section; if you need to distinguish between those two types you must use QXmlLexicalHandler::startCDATA() and QXmlLexicalHandler::endCDATA()). More...
 
bool comment (const QString &ch)
 The reader calls this function to report an XML comment anywhere in the document. More...
 
bool endCDATA ()
 The reader calls this function to report the end of a CDATA section. More...
 
bool endDocument ()
 The reader calls this function after it has finished parsing. More...
 
bool endElement (const QString &nsURI, const QString &localName, const QString &qName)
 The reader calls this function when it has parsed an end element tag with the qualified name qName, the local name localName and the namespace URI namespaceURI. More...
 
bool endEntity (const QString &)
 The reader calls this function to report the end of an entity called name. More...
 
bool externalEntityDecl (const QString &name, const QString &publicId, const QString &systemId)
 The reader calls this function to report a parsed external entity declaration. More...
 
bool fatalError (const QXmlParseException &exception)
 A reader must use this function to report a non-recoverable error. More...
 
bool notationDecl (const QString &name, const QString &publicId, const QString &systemId)
 The reader calls this function when it has parsed a notation declaration. More...
 
bool processingInstruction (const QString &target, const QString &data)
 The reader calls this function when it has parsed a processing instruction. More...
 
 QDomHandler (QDomDocumentPrivate *d, bool namespaceProcessing)
 
void setDocumentLocator (QXmlLocator *locator)
 The reader calls this function before it starts parsing the document. More...
 
bool skippedEntity (const QString &name)
 Some readers may skip entities if they have not seen the declarations (e. More...
 
bool startCDATA ()
 The reader calls this function to report the start of a CDATA section. More...
 
bool startDTD (const QString &name, const QString &publicId, const QString &systemId)
 The reader calls this function to report the start of a DTD declaration, if any. More...
 
bool startElement (const QString &nsURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
 The reader calls this function when it has parsed a start element tag. More...
 
bool startEntity (const QString &)
 The reader calls this function to report the start of an entity called name. More...
 
bool unparsedEntityDecl (const QString &name, const QString &publicId, const QString &systemId, const QString &notationName)
 The reader calls this function when it finds an unparsed entity declaration. More...
 
 ~QDomHandler ()
 
- Public Functions inherited from QXmlDefaultHandler
bool attributeDecl (const QString &eName, const QString &aName, const QString &type, const QString &valueDefault, const QString &value)
 This reimplementation does nothing. More...
 
bool characters (const QString &ch)
 This reimplementation does nothing. More...
 
bool comment (const QString &ch)
 This reimplementation does nothing. More...
 
bool endCDATA ()
 This reimplementation does nothing. More...
 
bool endDocument ()
 This reimplementation does nothing. More...
 
bool endDTD ()
 This reimplementation does nothing. More...
 
bool endElement (const QString &namespaceURI, const QString &localName, const QString &qName)
 This reimplementation does nothing. More...
 
bool endEntity (const QString &name)
 This reimplementation does nothing. More...
 
bool endPrefixMapping (const QString &prefix)
 This reimplementation does nothing. More...
 
bool error (const QXmlParseException &exception)
 This reimplementation does nothing. More...
 
QString errorString () const
 Returns the default error string. More...
 
bool externalEntityDecl (const QString &name, const QString &publicId, const QString &systemId)
 This reimplementation does nothing. More...
 
bool fatalError (const QXmlParseException &exception)
 This reimplementation does nothing. More...
 
bool ignorableWhitespace (const QString &ch)
 This reimplementation does nothing. More...
 
bool internalEntityDecl (const QString &name, const QString &value)
 This reimplementation does nothing. More...
 
bool notationDecl (const QString &name, const QString &publicId, const QString &systemId)
 This reimplementation does nothing. More...
 
bool processingInstruction (const QString &target, const QString &data)
 This reimplementation does nothing. More...
 
 QXmlDefaultHandler ()
 Constructs a handler for use with subclasses of QXmlReader. More...
 
bool resolveEntity (const QString &publicId, const QString &systemId, QXmlInputSource *&ret)
 Sets ret to 0, so that the reader uses the system identifier provided in the XML document. More...
 
void setDocumentLocator (QXmlLocator *locator)
 This reimplementation does nothing. More...
 
bool skippedEntity (const QString &name)
 This reimplementation does nothing. More...
 
bool startCDATA ()
 This reimplementation does nothing. More...
 
bool startDocument ()
 This reimplementation does nothing. More...
 
bool startDTD (const QString &name, const QString &publicId, const QString &systemId)
 This reimplementation does nothing. More...
 
bool startElement (const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
 This reimplementation does nothing. More...
 
bool startEntity (const QString &name)
 This reimplementation does nothing. More...
 
bool startPrefixMapping (const QString &prefix, const QString &uri)
 This reimplementation does nothing. More...
 
bool unparsedEntityDecl (const QString &name, const QString &publicId, const QString &systemId, const QString &notationName)
 This reimplementation does nothing. More...
 
bool warning (const QXmlParseException &exception)
 This reimplementation does nothing. More...
 
virtual ~QXmlDefaultHandler ()
 Destroys the handler. More...
 
- Public Functions inherited from QXmlContentHandler
virtual ~QXmlContentHandler ()
 Destroys the content handler. More...
 
- Public Functions inherited from QXmlErrorHandler
virtual ~QXmlErrorHandler ()
 Destroys the error handler. More...
 
- Public Functions inherited from QXmlDTDHandler
virtual ~QXmlDTDHandler ()
 Destroys the DTD handler. More...
 
- Public Functions inherited from QXmlEntityResolver
virtual ~QXmlEntityResolver ()
 Destroys the entity resolver. More...
 
- Public Functions inherited from QXmlLexicalHandler
virtual ~QXmlLexicalHandler ()
 Destroys the lexical handler. More...
 
- Public Functions inherited from QXmlDeclHandler
virtual ~QXmlDeclHandler ()
 Destroys the declaration handler. More...
 

Public Variables

int errorColumn
 
int errorLine
 
QString errorMsg
 

Properties

bool cdata
 
QDomDocumentPrivatedoc
 
QString entityName
 
QXmlLocatorlocator
 
QDomNodePrivatenode
 
bool nsProcessing
 

Detailed Description

Definition at line 583 of file qdom.cpp.

Constructors and Destructors

◆ QDomHandler()

QDomHandler::QDomHandler ( QDomDocumentPrivate d,
bool  namespaceProcessing 
)

Definition at line 7559 of file qdom.cpp.

7560  : errorLine(0), errorColumn(0), doc(adoc), node(adoc), cdata(false),
7561  nsProcessing(namespaceProcessing), locator(0)
7562 {
7563 }
bool nsProcessing
Definition: qdom.cpp:626
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
int errorLine
Definition: qdom.cpp:618
bool cdata
Definition: qdom.cpp:625
QXmlLocator * locator
Definition: qdom.cpp:627
int errorColumn
Definition: qdom.cpp:619
QDomNodePrivate * node
Definition: qdom.cpp:623

◆ ~QDomHandler()

QDomHandler::~QDomHandler ( )

Definition at line 7565 of file qdom.cpp.

7566 {
7567 }

Functions

◆ characters()

bool QDomHandler::characters ( const QString ch)
virtual

The reader calls this function when it has parsed a chunk of character data (either normal character data or character data inside a CDATA section; if you need to distinguish between those two types you must use QXmlLexicalHandler::startCDATA() and QXmlLexicalHandler::endCDATA()).

The character data is reported in ch.

Some readers report whitespace in element content using the ignorableWhitespace() function rather than using this one.

A reader may report the character data of an element in more than one chunk; e.g. a reader might want to report "a\<b" in three characters() events ("a ", "\<" and " b").

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

Implements QXmlContentHandler.

Definition at line 7625 of file qdom.cpp.

7626 {
7627  // No text as child of some document
7628  if (node == doc)
7629  return false;
7630 
7632  if (cdata) {
7633  n.reset(doc->createCDATASection(ch));
7634  } else if (!entityName.isEmpty()) {
7636  QString(), QString(), QString()));
7637  e->value = ch;
7638  e->ref.deref();
7639  doc->doctype()->appendChild(e.data());
7640  e.take();
7642  } else {
7643  n.reset(doc->createTextNode(ch));
7644  }
7646  node->appendChild(n.data());
7647  n.take();
7648 
7649  return true;
7650 }
QDomEntityReferencePrivate * createEntityReference(const QString &name)
Definition: qdom.cpp:6528
void setLocation(int lineNumber, int columnNumber)
Definition: qdom.cpp:1954
T * data() const
Returns the value of the pointer referenced by this object.
QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:3651
T * take()
Returns the value of the pointer referenced by this object.
QDomDocumentTypePrivate * doctype()
Definition: qdom.cpp:517
The QString class provides a Unicode character string.
Definition: qstring.h:83
QDomTextPrivate * createTextNode(const QString &data)
Definition: qdom.cpp:6452
QString entityName
Definition: qdom.cpp:624
virtual QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:1887
virtual int lineNumber() const =0
Returns the line number (starting at 1) or -1 if there is no line number available.
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
virtual int columnNumber() const =0
Returns the column number (starting at 1) or -1 if there is no column number available.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
bool cdata
Definition: qdom.cpp:625
QDomCDATASectionPrivate * createCDATASection(const QString &data)
Definition: qdom.cpp:6476
void reset(T *other=0)
Deletes the existing object it is pointing to if any, and sets its pointer to other.
QXmlLocator * locator
Definition: qdom.cpp:627
QDomNodePrivate * node
Definition: qdom.cpp:623

◆ comment()

bool QDomHandler::comment ( const QString ch)
virtual

The reader calls this function to report an XML comment anywhere in the document.

It reports the text of the comment in ch.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

Implements QXmlLexicalHandler.

Definition at line 7710 of file qdom.cpp.

7711 {
7712  QDomNodePrivate *n;
7713  n = doc->createComment(ch);
7715  node->appendChild(n);
7716  return true;
7717 }
void setLocation(int lineNumber, int columnNumber)
Definition: qdom.cpp:1954
QDomCommentPrivate * createComment(const QString &data)
Definition: qdom.cpp:6464
virtual QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:1887
virtual int lineNumber() const =0
Returns the line number (starting at 1) or -1 if there is no line number available.
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
virtual int columnNumber() const =0
Returns the column number (starting at 1) or -1 if there is no column number available.
QXmlLocator * locator
Definition: qdom.cpp:627
QDomNodePrivate * node
Definition: qdom.cpp:623

◆ endCDATA()

bool QDomHandler::endCDATA ( )
virtual

The reader calls this function to report the end of a CDATA section.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

See also
startCDATA(), QXmlContentHandler::characters()

Implements QXmlLexicalHandler.

Definition at line 7692 of file qdom.cpp.

7693 {
7694  cdata = false;
7695  return true;
7696 }
bool cdata
Definition: qdom.cpp:625

◆ endDocument()

bool QDomHandler::endDocument ( )
virtual

The reader calls this function after it has finished parsing.

It is called just once, and is the last handler function called. It is called after the reader has read all input or has abandoned parsing because of a fatal error.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

See also
startDocument()

Implements QXmlContentHandler.

Definition at line 7569 of file qdom.cpp.

7570 {
7571  // ### is this really necessary? (rms)
7572  if (node != doc)
7573  return false;
7574  return true;
7575 }
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
QDomNodePrivate * node
Definition: qdom.cpp:623

◆ endElement()

bool QDomHandler::endElement ( const QString namespaceURI,
const QString localName,
const QString qName 
)
virtual

The reader calls this function when it has parsed an end element tag with the qualified name qName, the local name localName and the namespace URI namespaceURI.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

See also
startElement(), {Namespace Support via Features}

Implements QXmlContentHandler.

Definition at line 7616 of file qdom.cpp.

7617 {
7618  if (!node || node == doc)
7619  return false;
7620  node = node->parent();
7621 
7622  return true;
7623 }
QDomNodePrivate * parent() const
Definition: qdom.cpp:161
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
QDomNodePrivate * node
Definition: qdom.cpp:623

◆ endEntity()

bool QDomHandler::endEntity ( const QString name)
virtual

The reader calls this function to report the end of an entity called name.

For every startEntity() call, there is a corresponding endEntity() call. The calls to startEntity() and endEntity() are properly nested.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

See also
startEntity(), QXmlContentHandler::skippedEntity(), QXmlSimpleReader::setFeature()

Implements QXmlLexicalHandler.

Definition at line 7704 of file qdom.cpp.

7705 {
7706  entityName.clear();
7707  return true;
7708 }
QString entityName
Definition: qdom.cpp:624
void clear()
Clears the contents of the string and makes it empty.
Definition: qstring.h:723

◆ externalEntityDecl()

bool QDomHandler::externalEntityDecl ( const QString name,
const QString publicId,
const QString systemId 
)
virtual

The reader calls this function to report a parsed external entity declaration.

Only the effective (first) declaration for each entity is reported.

The reader passes the name of the entity in name, the public identifier in publicId and the system identifier in systemId. If there is no public identifier specified, it passes an empty string in publicId.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

Implements QXmlDeclHandler.

Definition at line 7729 of file qdom.cpp.

7730 {
7731  return unparsedEntityDecl(name, publicId, systemId, QString());
7732 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
bool unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString &notationName)
The reader calls this function when it finds an unparsed entity declaration.
Definition: qdom.cpp:7719

◆ fatalError()

bool QDomHandler::fatalError ( const QXmlParseException exception)
virtual

A reader must use this function to report a non-recoverable error.

Details of the error are stored in exception.

If this function returns true the reader might try to go on parsing and reporting further errors, but no regular parsing events are reported.

Implements QXmlErrorHandler.

Definition at line 7678 of file qdom.cpp.

7679 {
7680  errorMsg = exception.message();
7681  errorLine = exception.lineNumber();
7682  errorColumn = exception.columnNumber();
7683  return QXmlDefaultHandler::fatalError(exception);
7684 }
int errorLine
Definition: qdom.cpp:618
int columnNumber() const
Returns the column number where the error occurred.
Definition: qxml.cpp:609
QString message() const
Returns the error message.
Definition: qxml.cpp:602
QString errorMsg
Definition: qdom.cpp:617
int errorColumn
Definition: qdom.cpp:619
bool fatalError(const QXmlParseException &exception)
This reimplementation does nothing.
Definition: qxml.cpp:2811
int lineNumber() const
Returns the line number where the error occurred.
Definition: qxml.cpp:616

◆ notationDecl()

bool QDomHandler::notationDecl ( const QString name,
const QString publicId,
const QString systemId 
)
virtual

The reader calls this function when it has parsed a notation declaration.

The argument name is the notation name, publicId is the notation's public identifier and systemId is the notation's system identifier.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

Implements QXmlDTDHandler.

Definition at line 7734 of file qdom.cpp.

7735 {
7736  QDomNotationPrivate* n = new QDomNotationPrivate(doc, 0, name, publicId, systemId);
7737  // keep the refcount balanced: appendChild() does a ref anyway.
7738  n->ref.deref();
7739  doc->doctype()->appendChild(n);
7740  return true;
7741 }
QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:3651
QDomDocumentTypePrivate * doctype()
Definition: qdom.cpp:517
QAtomicInt ref
Definition: qdom.cpp:191
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
bool deref()
Atomically decrements the value of this QAtomicInt.

◆ processingInstruction()

bool QDomHandler::processingInstruction ( const QString target,
const QString data 
)
virtual

The reader calls this function when it has parsed a processing instruction.

target is the target name of the processing instruction and data is the data in the processing instruction.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

Implements QXmlContentHandler.

Definition at line 7652 of file qdom.cpp.

7653 {
7654  QDomNodePrivate *n;
7655  n = doc->createProcessingInstruction(target, data);
7656  if (n) {
7658  node->appendChild(n);
7659  return true;
7660  }
7661  else
7662  return false;
7663 }
void setLocation(int lineNumber, int columnNumber)
Definition: qdom.cpp:1954
QDomProcessingInstructionPrivate * createProcessingInstruction(const QString &target, const QString &data)
Definition: qdom.cpp:6488
virtual QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:1887
virtual int lineNumber() const =0
Returns the line number (starting at 1) or -1 if there is no line number available.
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
virtual int columnNumber() const =0
Returns the column number (starting at 1) or -1 if there is no column number available.
QXmlLocator * locator
Definition: qdom.cpp:627
QDomNodePrivate * node
Definition: qdom.cpp:623

◆ setDocumentLocator()

void QDomHandler::setDocumentLocator ( QXmlLocator locator)
virtual

The reader calls this function before it starts parsing the document.

The argument locator is a pointer to a QXmlLocator which allows the application to get the parsing position within the document.

Do not destroy the locator; it is destroyed when the reader is destroyed. (Do not use the locator after the reader is destroyed).

Implements QXmlContentHandler.

Definition at line 7743 of file qdom.cpp.

7744 {
7745  this->locator = locator;
7746 }
QXmlLocator * locator
Definition: qdom.cpp:627

◆ skippedEntity()

bool QDomHandler::skippedEntity ( const QString name)
virtual

Some readers may skip entities if they have not seen the declarations (e.

g. because they are in an external DTD). If they do so they report that they skipped the entity called name by calling this function.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

Implements QXmlContentHandler.

Definition at line 7666 of file qdom.cpp.

7667 {
7668  // we can only handle inserting entity references into content
7670  return true;
7671 
7674  node->appendChild(n);
7675  return true;
7676 }
QDomEntityReferencePrivate * createEntityReference(const QString &name)
Definition: qdom.cpp:6528
void setLocation(int lineNumber, int columnNumber)
Definition: qdom.cpp:1954
virtual QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:1887
virtual int lineNumber() const =0
Returns the line number (starting at 1) or -1 if there is no line number available.
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
virtual int columnNumber() const =0
Returns the column number (starting at 1) or -1 if there is no column number available.
QXmlLocator * locator
Definition: qdom.cpp:627
QDomNodePrivate * node
Definition: qdom.cpp:623
bool qt_xml_skipped_entity_in_content
Definition: qxml.cpp:104

◆ startCDATA()

bool QDomHandler::startCDATA ( )
virtual

The reader calls this function to report the start of a CDATA section.

The content of the CDATA section is reported through the QXmlContentHandler::characters() function. This function is intended only to report the boundary.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

See also
endCDATA()

Implements QXmlLexicalHandler.

Definition at line 7686 of file qdom.cpp.

7687 {
7688  cdata = true;
7689  return true;
7690 }
bool cdata
Definition: qdom.cpp:625

◆ startDTD()

bool QDomHandler::startDTD ( const QString name,
const QString publicId,
const QString systemId 
)
virtual

The reader calls this function to report the start of a DTD declaration, if any.

It reports the name of the document type in name, the public identifier in publicId and the system identifier in systemId.

If the public identifier is missing, publicId is set to an empty string. If the system identifier is missing, systemId is set to an empty string. Note that it is not valid XML to have a public identifier but no system identifier; in such cases a parse error will occur.

All declarations reported through QXmlDTDHandler or QXmlDeclHandler appear between the startDTD() and endDTD() calls.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

See also
endDTD()

Implements QXmlLexicalHandler.

Definition at line 7577 of file qdom.cpp.

7578 {
7579  doc->doctype()->name = name;
7580  doc->doctype()->publicId = publicId;
7581  doc->doctype()->systemId = systemId;
7582  return true;
7583 }
QString name
Definition: qdom.cpp:198
QDomDocumentTypePrivate * doctype()
Definition: qdom.cpp:517
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
const char * name

◆ startElement()

bool QDomHandler::startElement ( const QString namespaceURI,
const QString localName,
const QString qName,
const QXmlAttributes atts 
)
virtual

The reader calls this function when it has parsed a start element tag.

There is a corresponding endElement() call when the corresponding end element tag is read. The startElement() and endElement() calls are always nested correctly. Empty element tags (e.g. <x>) cause a startElement() call to be immediately followed by an endElement() call.

The attribute list provided only contains attributes with explicit values. The attribute list contains attributes used for namespace declaration (i.e. attributes starting with xmlns) only if the namespace-prefix property of the reader is true.

The argument namespaceURI is the namespace URI, or an empty string if the element has no namespace URI or if no namespace processing is done. localName is the local name (without prefix), or an empty string if no namespace processing is done, qName is the qualified name (with prefix) and atts are the attributes attached to the element. If there are no attributes, atts is an empty attributes object.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

See also
endElement(), {Namespace Support via Features}

Implements QXmlContentHandler.

Definition at line 7585 of file qdom.cpp.

7586 {
7587  // tag name
7588  QDomNodePrivate* n;
7589  if (nsProcessing) {
7590  n = doc->createElementNS(nsURI, qName);
7591  } else {
7592  n = doc->createElement(qName);
7593  }
7594 
7595  if (!n)
7596  return false;
7597 
7599 
7600  node->appendChild(n);
7601  node = n;
7602 
7603  // attributes
7604  for (int i=0; i<atts.length(); i++)
7605  {
7606  if (nsProcessing) {
7607  ((QDomElementPrivate*)node)->setAttributeNS(atts.uri(i), atts.qName(i), atts.value(i));
7608  } else {
7609  ((QDomElementPrivate*)node)->setAttribute(atts.qName(i), atts.value(i));
7610  }
7611  }
7612 
7613  return true;
7614 }
QString value(int index) const
Returns an attribute&#39;s value for the attribute at position index.
Definition: qxml.cpp:1192
void setLocation(int lineNumber, int columnNumber)
Definition: qdom.cpp:1954
virtual QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:1887
virtual int lineNumber() const =0
Returns the line number (starting at 1) or -1 if there is no line number available.
bool nsProcessing
Definition: qdom.cpp:626
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
virtual int columnNumber() const =0
Returns the column number (starting at 1) or -1 if there is no column number available.
QXmlLocator * locator
Definition: qdom.cpp:627
int length() const
Returns the number of attributes in the list.
Definition: qxml.cpp:1092
QString uri(int index) const
Looks up an attribute&#39;s namespace URI for the attribute at position index.
Definition: qxml.cpp:1137
QDomElementPrivate * createElementNS(const QString &nsURI, const QString &qName)
Definition: qdom.cpp:6433
QString qName(int index) const
Looks up an attribute&#39;s XML 1.0 qualified name for the attribute at position index.
Definition: qxml.cpp:1125
QDomNodePrivate * node
Definition: qdom.cpp:623
QDomElementPrivate * createElement(const QString &tagName)
Definition: qdom.cpp:6421

◆ startEntity()

bool QDomHandler::startEntity ( const QString name)
virtual

The reader calls this function to report the start of an entity called name.

Note that if the entity is unknown, the reader reports it through QXmlContentHandler::skippedEntity() and not through this function.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

See also
endEntity(), QXmlSimpleReader::setFeature()

Implements QXmlLexicalHandler.

Definition at line 7698 of file qdom.cpp.

7699 {
7700  entityName = name;
7701  return true;
7702 }
QString entityName
Definition: qdom.cpp:624
const char * name

◆ unparsedEntityDecl()

bool QDomHandler::unparsedEntityDecl ( const QString name,
const QString publicId,
const QString systemId,
const QString notationName 
)
virtual

The reader calls this function when it finds an unparsed entity declaration.

The argument name is the unparsed entity's name, publicId is the entity's public identifier, systemId is the entity's system identifier and notationName is the name of the associated notation.

If this function returns false the reader stops parsing and reports an error. The reader uses the function errorString() to get the error message.

Implements QXmlDTDHandler.

Definition at line 7719 of file qdom.cpp.

Referenced by externalEntityDecl().

7720 {
7721  QDomEntityPrivate* e = new QDomEntityPrivate(doc, 0, name,
7722  publicId, systemId, notationName);
7723  // keep the refcount balanced: appendChild() does a ref anyway.
7724  e->ref.deref();
7725  doc->doctype()->appendChild(e);
7726  return true;
7727 }
QDomNodePrivate * appendChild(QDomNodePrivate *newChild)
Definition: qdom.cpp:3651
QDomDocumentTypePrivate * doctype()
Definition: qdom.cpp:517
QAtomicInt ref
Definition: qdom.cpp:191
QDomDocumentPrivate * doc
Definition: qdom.cpp:622
bool deref()
Atomically decrements the value of this QAtomicInt.

Properties

◆ cdata

bool QDomHandler::cdata
private

Definition at line 625 of file qdom.cpp.

Referenced by characters(), endCDATA(), and startCDATA().

◆ doc

QDomDocumentPrivate* QDomHandler::doc
private

◆ entityName

QString QDomHandler::entityName
private

Definition at line 624 of file qdom.cpp.

Referenced by characters(), endEntity(), and startEntity().

◆ errorColumn

int QDomHandler::errorColumn

Definition at line 619 of file qdom.cpp.

Referenced by fatalError(), and QDomDocumentPrivate::setContent().

◆ errorLine

int QDomHandler::errorLine

Definition at line 618 of file qdom.cpp.

Referenced by fatalError(), and QDomDocumentPrivate::setContent().

◆ errorMsg

QString QDomHandler::errorMsg

Definition at line 617 of file qdom.cpp.

Referenced by fatalError(), and QDomDocumentPrivate::setContent().

◆ locator

QXmlLocator* QDomHandler::locator
private

◆ node

QDomNodePrivate* QDomHandler::node
private

◆ nsProcessing

bool QDomHandler::nsProcessing
private

Definition at line 626 of file qdom.cpp.

Referenced by startElement().


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