qdomdocument man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



QDomDocument(3qt)				QDomDocument(3qt)

NAME
       QDomDocument - The representation of an XML document

       #include <qdom.h>

       Inherits QDomNode.

   Public Members
       QDomDocument ()
       QDomDocument ( const QString & name )
       QDomDocument ( const QDomDocument & x )
       QDomDocument& operator= ( const QDomDocument & )
       ~QDomDocument ()
       bool setContent ( const QCString & text )
       bool setContent ( const QByteArray & text )
       bool setContent ( const QString & text )
       bool setContent ( QIODevice * dev )
       QDomDocumentType doctype () const
       QDomImplementation implementation () const
       QDomElement documentElement () const
       QDomElement createElement ( const QString & tagName )
       QDomDocumentFragment createDocumentFragment ()
       QDomText createTextNode ( const QString & data )
       QDomComment createComment ( const QString & data )
       QDomCDATASection createCDATASection ( const QString & data
	   )
       QDomProcessingInstruction createProcessingInstruction (
	   const QString & target, const QString & data )
       QDomAttr createAttribute ( const QString & name )
       QDomEntityReference createEntityReference ( const QString
	   & name )
       QDomNodeList elementsByTagName ( const QString & tagname )
	   const
       virtual QDomNode::NodeType nodeType () const
       virtual bool isDocument () const
       QString toString () const
       QCString toCString () const

DESCRIPTION
       The QDomDocument class is the representation of an XML
       document.

       The QDomDocument class represents the entire XML document.
       Conceptually, it is the root of the document tree, and
       provides the primary access to the document's data.

       Since elements, text nodes, comments, processing
       instructions, etc. cannot exist outside the context of a
       document, the document class also contains the factory
       functions needed to create these objects. The node objects
       created have an ownerDocument() function which associates
       them with the document within whose context they were
       created.

Trolltech AS		   13 June 2001				1

QDomDocument(3qt)				QDomDocument(3qt)

       The parsed XML is represented internally by a tree of
       objects that can be accessed using the various QDom
       classes. All QDom classes do only reference objects in the
       internal tree. The internal objects in the DOM tree will
       get deleted, once the last QDom object referencing them
       and the QDomDocument are deleted.

       Creation of elements, text nodes, etc. is done via the
       various factory functions provided in this class. Using
       the default constructors of the QDom classes will only
       result in empty objects, that can not be manipulated or
       inserted into the Document.

       The QDom classes are typically used as follows:

	 QDomDocument doc( "mydocument" );
	 QFile f( "mydocument.xml" );
	 if ( !f.open( IO_ReadOnly ) )
	     return;
	 if ( !doc.setContent( &f ) ) {
	     f.close();
	     return;
	 }
	 f.close();
	 // print out the element names of all elements that are a direct child
	 // of the outermost element.
	 QDomElement docElem = doc.documentElement();
	 QDomNode n = docElem.firstChild();
	 while( !n.isNull() ) {
	     QDomElement e = n.toElement(); // try to convert the node to an element.
	     if( !e.isNull() ) { // the node was really an element.
		 cout << e.tagName() << endl;
	     }
	     n = n.nextSibling();
	 }
	 // lets append a new element to the end of the document
	 QDomElement elem = doc.createElement( "img" );
	 elem.setAttribute( "src", "myimage.png" );
	 docElem.appendChild( elem );

       Once doc and elem go out of scode, the whole internal tree
       representing the XML document will get deleted.

       For further information about the Document Objct Model see
       http://www.w3.org/TR/REC-DOM-Level-1/

MEMBER FUNCTION DOCUMENTATION
QDomDocument::QDomDocument ()
       Constructs an empty document.

QDomDocument::QDomDocument ( const QString & name )
       Creates a document with the name name.

Trolltech AS		   13 June 2001				2

QDomDocument(3qt)				QDomDocument(3qt)

QDomDocument::QDomDocument ( const QDomDocument & x )
       Copy constructor.

       The data of the copy is shared: modifying one will also
       change the other. If you want to make a real copy, use
       cloneNode() instead.

QDomDocument::~QDomDocument ()
       Destructor.

QDomAttr QDomDocument::createAttribute ( const QString & name )
       Creates a new attribute that can be inserted into an
       element.

QDomCDATASection QDomDocument::createCDATASection ( const QString
       & value )
       Creates a new CDATA section that can be inserted into the
       document.

QDomComment QDomDocument::createComment ( const QString & value )
       Creates a new comment that can be inserted into the
       Document.

QDomDocumentFragment QDomDocument::createDocumentFragment ()
       Creates a new document fragment, that can be used to hold
       parts of the document, when doing complex manipulations of
       the document tree.

QDomElement QDomDocument::createElement ( const QString & tagName
       )
       Creates a new element with the name tagName that can be
       inserted into the DOM tree.

QDomEntityReference QDomDocument::createEntityReference ( const
       QString & name )
       Creates a new entity reference.

QDomProcessingInstruction
       QDomDocument::createProcessingInstruction ( const QString
       & target, const QString & data )
       Creates a new processing instruction that can be inserted
       into the document.

QDomText QDomDocument::createTextNode ( const QString & value )
       Creates a text node that can be inserted into the document
       tree.

QDomDocumentType QDomDocument::doctype () const
       Returns the document type of this document.

QDomElement QDomDocument::documentElement () const
       Returns the root element of the document.

Trolltech AS		   13 June 2001				3

QDomDocument(3qt)				QDomDocument(3qt)

QDomNodeList QDomDocument::elementsByTagName ( const QString &
       tagname ) const
       Returns a QDomNodeList, that contains all elements in the
       document with the tag name tagname. The order of the node
       list, is the order they are encountered in a preorder
       traversal of the element tree.

QDomImplementation QDomDocument::implementation () const
       Returns a QDomImplementation object.

bool QDomDocument::isDocument () const [virtual]
       Returns TRUE.

       Reimplemented from QDomNode.

QDomNode::NodeType QDomDocument::nodeType() const [virtual]
       Returns DocumentNode.

       Reimplemented from QDomNode.

QDomDocument& QDomDocument::operator= ( const QDomDocument & x )
       Assignment operator.

       The data of the copy is shared: modifying one will also
       change the other. If you want to make a real copy, use
       cloneNode() instead.

bool QDomDocument::setContent ( const QString & text )
       This function parses the string text and sets it as the
       content of the document.

bool QDomDocument::setContent ( QIODevice * dev )
       This is an overloaded member function, provided for
       convenience. It differs from the above function only in
       what argument(s) it accepts.

bool QDomDocument::setContent ( const QByteArray & buffer )
       This is an overloaded member function, provided for
       convenience. It differs from the above function only in
       what argument(s) it accepts.

bool QDomDocument::setContent ( const QCString & buffer )
       This is an overloaded member function, provided for
       convenience. It differs from the above function only in
       what argument(s) it accepts.

QCString QDomDocument::toCString () const
       Converts the parsed document back to its textual
       representation.

QString QDomDocument::toString () const
       Converts the parsed document back to its textual
       representation.

Trolltech AS		   13 June 2001				4

QDomDocument(3qt)				QDomDocument(3qt)

SEE ALSO
       http://doc.trolltech.com/qdomdocument.html
       http://www.trolltech.com/faq/tech.html

COPYRIGHT
       Copyright 1992-2001 Trolltech AS,
       http://www.trolltech.com.  See the license file included
       in the distribution for a complete license statement.

AUTHOR
       Generated automatically from the source code.

BUGS
       If you find a bug in Qt, please report it as described in
       http://doc.trolltech.com/bughowto.html.	Good bug reports
       make our job much simpler. Thank you.

       In case of content or formattting problems with this
       manual page, please report them to qt-bugs@trolltech.com.
       Please include the name of the manual page
       (qdomdocument.3qt) and the Qt version (2.3.1).

Trolltech AS		   13 June 2001				5

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net