// This is the SIP interface definition for the TQDom classes. // // Copyright (c) 2007 // Riverbank Computing Limited // // This file is part of PyTQt. // // This copy of PyTQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free // Software Foundation; either version 2, or (at your option) any later // version. // // PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %ExportedDoc TQDomImplementation (TQt v2.2+) TQDomImplementation is fully implemented. TQDomNode (TQt v2.2+) TQDomNode is fully implemented, including the Python == and != operators. TQDomNodeList (TQt v2.2+) TQDomNodeList is fully implemented. TQDomDocument (TQt v2.2+) bool setContent const TQCString &buffer bool namespaceProcessing TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 This takes the buffer and namespaceProcessing parameters and returns a tuple containing the bool result and the errorMsg, errorLine and errorColumn values. (TQt v3+) bool setContent const TQByteArray &buffer bool namespaceProcessing TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 This takes the buffer and namespaceProcessing parameters and returns a tuple containing the bool result and the errorMsg, errorLine and errorColumn values. (TQt v3+) bool setContent const TQString &text bool namespaceProcessing TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 This takes the text and namespaceProcessing parameters and returns a tuple containing the bool result and the errorMsg, errorLine and errorColumn values. (TQt v3+) bool setContent const TQIODevice *dev bool namespaceProcessing TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 This takes the dev and namespaceProcessing parameters and returns a tuple containing the bool result and the errorMsg, errorLine and errorColumn values. (TQt v3+) bool setContent const TQCString &buffer TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 This takes the buffer parameter only and returns a tuple containing the bool result and the errorMsg, errorLine and errorColumn values. (TQt v3+) bool setContent const TQByteArray &buffer TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 This takes the buffer parameter only and returns a tuple containing the bool result and the errorMsg, errorLine and errorColumn values. (TQt v3+) bool setContent const TQString &text TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 This takes the text parameter only and returns a tuple containing the bool result and the errorMsg, errorLine and errorColumn values. (TQt v3+) bool setContent const TQIODevice *dev TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 This takes the dev parameter only and returns a tuple containing the bool result and the errorMsg, errorLine and errorColumn values. (TQt v3+) bool setContent TQXmlInputSource *source TQXmlReader *reader TQString *errorMsg = 0 int *errorLine = 0 int *errorColumn = 0 Not yet implemented. (TQt v3.2.0+) TQDomDocumentFragment (TQt v2.2+) TQDomDocumentFragment is fully implemented. TQDomDocumentType (TQt v2.2+) TQDomDocumentType is fully implemented. TQDomNamedNodeMap (TQt v2.2+) TQDomNamedNodeMap is fully implemented. TQDomCharacterData (TQt v2.2+) TQDomCharacterData is fully implemented. TQDomAttr (TQt v2.2+) TQDomAttr is fully implemented. TQDomElement (TQt v2.2+) TQDomElement is fully implemented. TQDomText (TQt v2.2+) TQDomText is fully implemented. TQDomComment (TQt v2.2+) TQDomComment is fully implemented. TQDomCDATASection (TQt v2.2+) TQDomCDATASection is fully implemented. TQDomNotation (TQt v2.2+) TQDomNotation is fully implemented. TQDomEntity (TQt v2.2+) TQDomEntity is fully implemented. TQDomEntityReference (TQt v2.2+) TQDomEntityReference is fully implemented. TQDomProcessingInstruction (TQt v2.2+) TQDomProcessingInstruction is fully implemented. %End %If (TQt_DOM) %If (TQt_2_2_0 -) class TQDomImplementation { %TypeHeaderCode #include %End public: TQDomImplementation(); TQDomImplementation(const TQDomImplementation &); virtual bool hasFeature(const TQString &,const TQString &); %If (TQt_3_0_0 -) virtual TQDomDocumentType createDocumentType(const TQString &, const TQString &, const TQString &); virtual TQDomDocument createDocument(const TQString &,const TQString &, const TQDomDocumentType &); %End bool isNull(); }; class TQDomNode { %TypeHeaderCode #include %End public: enum NodeType { ElementNode, AttributeNode, TextNode, CDATASectionNode, EntityReferenceNode, EntityNode, ProcessingInstructionNode, CommentNode, DocumentNode, DocumentTypeNode, DocumentFragmentNode, NotationNode, BaseNode, CharacterDataNode }; TQDomNode(); TQDomNode(const TQDomNode &); bool operator==(const TQDomNode &) const; bool operator!=(const TQDomNode &) const; virtual TQDomNode insertBefore(const TQDomNode &,const TQDomNode &); virtual TQDomNode insertAfter(const TQDomNode &,const TQDomNode &); virtual TQDomNode replaceChild(const TQDomNode &,const TQDomNode &); virtual TQDomNode removeChild(const TQDomNode &); virtual TQDomNode appendChild(const TQDomNode &); %If (TQt_3_0_0 -) virtual bool hasChildNodes() const; %End virtual TQDomNode cloneNode(bool = 1) const; %If (TQt_3_0_0 -) virtual void normalize(); virtual bool isSupported(const TQString &,const TQString &) const; %End virtual TQString nodeName() const; virtual NodeType nodeType() const; virtual TQDomNode parentNode() const; virtual TQDomNodeList childNodes() const; virtual TQDomNode firstChild() const; virtual TQDomNode lastChild() const; virtual TQDomNode previousSibling() const; virtual TQDomNode nextSibling() const; virtual TQDomNamedNodeMap attributes() const; virtual TQDomDocument ownerDocument() const; %If (TQt_3_0_0 -) virtual TQString namespaceURI() const; virtual TQString localName() const; virtual bool hasAttributes() const; %End virtual TQString nodeValue() const; virtual void setNodeValue(const TQString &); %If (TQt_3_0_0 -) virtual TQString prefix() const; virtual void setPrefix(const TQString &); %End virtual bool isAttr() const; virtual bool isCDATASection() const; virtual bool isDocumentFragment() const; virtual bool isDocument() const; virtual bool isDocumentType() const; virtual bool isElement() const; virtual bool isEntityReference() const; virtual bool isText() const; virtual bool isEntity() const; virtual bool isNotation() const; virtual bool isProcessingInstruction() const; virtual bool isCharacterData() const; virtual bool isComment() const; TQDomNode namedItem(const TQString &) const; bool isNull() const; void clear(); TQDomAttr toAttr(); TQDomCDATASection toCDATASection(); TQDomDocumentFragment toDocumentFragment(); TQDomDocument toDocument(); TQDomDocumentType toDocumentType(); TQDomElement toElement(); TQDomEntityReference toEntityReference(); TQDomText toText(); TQDomEntity toEntity(); TQDomNotation toNotation(); TQDomProcessingInstruction toProcessingInstruction(); TQDomCharacterData toCharacterData(); TQDomComment toComment(); void save(TQTextStream &,int) const; }; class TQDomNodeList { %TypeHeaderCode #include %End public: TQDomNodeList(); TQDomNodeList(const TQDomNodeList &); virtual TQDomNode item(int) const; virtual uint length() const; uint count() const; }; class TQDomDocumentType : TQDomNode { %TypeHeaderCode #include %End public: TQDomDocumentType(); TQDomDocumentType(const TQDomDocumentType &); virtual TQString name() const; virtual TQDomNamedNodeMap entities() const; virtual TQDomNamedNodeMap notations() const; %If (TQt_3_0_0 -) virtual TQString publicId() const; virtual TQString systemId() const; virtual TQString internalSubset() const; %End TQDomNode::NodeType nodeType() const; bool isDocumentType() const; }; class TQDomDocument : TQDomNode { %TypeHeaderCode #include %End public: TQDomDocument(); TQDomDocument(const TQString &); %If (TQt_3_0_0 -) TQDomDocument(const TQDomDocumentType &); %End TQDomDocument(const TQDomDocument &); TQDomElement createElement(const TQString &); TQDomDocumentFragment createDocumentFragment(); TQDomText createTextNode(const TQString &); TQDomComment createComment(const TQString &); TQDomCDATASection createCDATASection(const TQString &); TQDomProcessingInstruction createProcessingInstruction(const TQString &, const TQString &); TQDomAttr createAttribute(const TQString &); TQDomEntityReference createEntityReference(const TQString &); TQDomNodeList elementsByTagName(const TQString &) const; %If (TQt_3_0_0 -) TQDomElement elementById(const TQString &); %End TQDomDocumentType doctype() const; TQDomImplementation implementation() const; TQDomElement documentElement() const; %If (- TQt_3_0_0) bool setContent(const TQCString &); bool setContent(const TQByteArray &); bool setContent(const TQString &); bool setContent(TQIODevice *); %End %If (TQt_3_0_0 -) // Note that we need handwritten code for these because of the need to // allocate storage for the error string. SIP_PYTUPLE setContent(const TQCString &,bool); %MethodCode bool res; TQString *emsg = new TQString(); int eline, ecol; Py_BEGIN_ALLOW_THREADS res = sipCpp -> TQDomDocument::setContent(*a0,a1,emsg,&eline,&ecol); Py_END_ALLOW_THREADS sipRes = sipBuildResult(&sipIsErr, "(bNii)", res, emsg, sipType_TQString, (PyObject *)0, eline, ecol); %End SIP_PYTUPLE setContent(const TQByteArray &,bool); %MethodCode bool res; TQString *emsg = new TQString(); int eline, ecol; Py_BEGIN_ALLOW_THREADS res = sipCpp -> TQDomDocument::setContent(*a0,a1,emsg,&eline,&ecol); Py_END_ALLOW_THREADS sipRes = sipBuildResult(&sipIsErr, "(bNii)", res, emsg, sipType_TQString, (PyObject *)0, eline, ecol); %End SIP_PYTUPLE setContent(const TQString &,bool); %MethodCode bool res; TQString *emsg = new TQString(); int eline, ecol; Py_BEGIN_ALLOW_THREADS res = sipCpp -> TQDomDocument::setContent(*a0,a1,emsg,&eline,&ecol); Py_END_ALLOW_THREADS sipRes = sipBuildResult(&sipIsErr, "(bNii)", res, emsg, sipType_TQString, (PyObject *)0, eline, ecol); %End SIP_PYTUPLE setContent(TQIODevice *,bool); %MethodCode bool res; TQString *emsg = new TQString(); int eline, ecol; Py_BEGIN_ALLOW_THREADS res = sipCpp -> TQDomDocument::setContent(a0,a1,emsg,&eline,&ecol); Py_END_ALLOW_THREADS sipRes = sipBuildResult(&sipIsErr, "(bNii)", res, emsg, sipType_TQString, (PyObject *)0, eline, ecol); %End SIP_PYTUPLE setContent(const TQCString &); %MethodCode bool res; TQString *emsg = new TQString(); int eline, ecol; Py_BEGIN_ALLOW_THREADS res = sipCpp -> TQDomDocument::setContent(*a0,emsg,&eline,&ecol); Py_END_ALLOW_THREADS sipRes = sipBuildResult(&sipIsErr, "(bNii)", res, emsg, sipType_TQString, (PyObject *)0, eline, ecol); %End SIP_PYTUPLE setContent(const TQByteArray &); %MethodCode bool res; TQString *emsg = new TQString(); int eline, ecol; Py_BEGIN_ALLOW_THREADS res = sipCpp -> TQDomDocument::setContent(*a0,emsg,&eline,&ecol); Py_END_ALLOW_THREADS sipRes = sipBuildResult(&sipIsErr, "(bNii)", res, emsg, sipType_TQString, (PyObject *)0, eline, ecol); %End SIP_PYTUPLE setContent(const TQString &); %MethodCode bool res; TQString *emsg = new TQString(); int eline, ecol; Py_BEGIN_ALLOW_THREADS res = sipCpp -> TQDomDocument::setContent(*a0,emsg,&eline,&ecol); Py_END_ALLOW_THREADS sipRes = sipBuildResult(&sipIsErr, "(bNii)", res, emsg, sipType_TQString, (PyObject *)0, eline, ecol); %End SIP_PYTUPLE setContent(TQIODevice *); %MethodCode bool res; TQString *emsg = new TQString(); int eline, ecol; Py_BEGIN_ALLOW_THREADS res = sipCpp -> TQDomDocument::setContent(a0,emsg,&eline,&ecol); Py_END_ALLOW_THREADS sipRes = sipBuildResult(&sipIsErr, "(bNii)", res, emsg, sipType_TQString, (PyObject *)0, eline, ecol); %End %End %If (TQt_3_2_0 -) // bool setContent(TQXmlInputSource *,TQXmlReader *,TQString * = 0,int * = 0, // int * = 0); %End TQDomNode::NodeType nodeType() const; bool isDocument() const; TQString toString() const; %If (TQt_3_1_0 -) TQString toString(int) const; %End TQCString toCString() const; %If (TQt_3_1_0 -) TQCString toCString(int) const; %End }; class TQDomNamedNodeMap { %TypeHeaderCode #include %End public: TQDomNamedNodeMap(); TQDomNamedNodeMap(const TQDomNamedNodeMap &); TQDomNode namedItem(const TQString &) const; TQDomNode setNamedItem(const TQDomNode &); TQDomNode removeNamedItem(const TQString &); TQDomNode item(int) const; %If (TQt_3_0_0 -) TQDomNode namedItemNS(const TQString &,const TQString &) const; TQDomNode setNamedItemNS(const TQDomNode &); TQDomNode removeNamedItemNS(const TQString &,const TQString &); %End uint length() const; %If (TQt_3_0_0 -) uint count() const; %End bool contains(const TQString &) const; }; class TQDomDocumentFragment : TQDomNode { %TypeHeaderCode #include %End public: TQDomDocumentFragment(); TQDomDocumentFragment(const TQDomDocumentFragment &); TQDomNode::NodeType nodeType() const; bool isDocumentFragment() const; }; class TQDomCharacterData : TQDomNode { %TypeHeaderCode #include %End public: TQDomCharacterData(); TQDomCharacterData(const TQDomCharacterData &); virtual TQString substringData(unsigned long,unsigned long); virtual void appendData(const TQString &); virtual void insertData(unsigned long,const TQString &); virtual void deleteData(unsigned long,unsigned long); virtual void replaceData(unsigned long,unsigned long,const TQString &); virtual uint length() const; virtual TQString data() const; virtual void setData(const TQString &); TQDomNode::NodeType nodeType() const; bool isCharacterData() const; }; class TQDomAttr : TQDomNode { %TypeHeaderCode #include %End public: TQDomAttr(); TQDomAttr(const TQDomAttr&); virtual TQString name() const; virtual bool specified() const; %If (TQt_3_0_0 -) virtual TQDomElement ownerElement() const; %End virtual TQString value() const; virtual void setValue(const TQString &); TQDomNode::NodeType nodeType() const; bool isAttr() const; }; class TQDomElement : TQDomNode { %TypeHeaderCode #include %End public: TQDomElement(); TQDomElement(const TQDomElement &); TQString attribute(const TQString &, const TQString & = TQString::null) const; void setAttribute(const TQString &,const TQString &); void setAttribute(const TQString &,int /Constrained/); // void setAttribute(const TQString &,uint); %If (TQt_3_2_0 -) // void setAttribute(const TQString &,long); // void setAttribute(const TQString &,ulong); %End void setAttribute(const TQString &,double); void removeAttribute(const TQString &); TQDomAttr attributeNode(const TQString &); TQDomAttr setAttributeNode(const TQDomAttr &); TQDomAttr removeAttributeNode(const TQDomAttr &); virtual TQDomNodeList elementsByTagName(const TQString &) const; bool hasAttribute(const TQString &) const; %If (- TQt_3_0_0) void normalize(); %End %If (TQt_3_0_0 -) TQString attributeNS(const TQString,const TQString &, const TQString &) const; void setAttributeNS(const TQString,const TQString &,const TQString &); void setAttributeNS(const TQString,const TQString &,int /Constrained/); // void setAttributeNS(const TQString,const TQString &,uint); %If (TQt_3_2_0 -) // void setAttributeNS(const TQString &,const TQString &,long); // void setAttributeNS(const TQString &,const TQString &,ulong); %End void setAttributeNS(const TQString,const TQString &,double); void removeAttributeNS(const TQString &,const TQString &); TQDomAttr attributeNodeNS(const TQString &,const TQString &); TQDomAttr setAttributeNodeNS(const TQDomAttr &); virtual TQDomNodeList elementsByTagNameNS(const TQString &, const TQString &) const; bool hasAttributeNS(const TQString &,const TQString &) const; %End TQString tagName() const; void setTagName(const TQString &); TQDomNamedNodeMap attributes() const; TQDomNode::NodeType nodeType() const; bool isElement() const; TQString text() const; }; class TQDomText : TQDomCharacterData { %TypeHeaderCode #include %End public: TQDomText(); TQDomText(const TQDomText &); TQDomText splitText(int); TQDomNode::NodeType nodeType() const; bool isText() const; }; class TQDomComment : TQDomCharacterData { %TypeHeaderCode #include %End public: TQDomComment(); TQDomComment(const TQDomComment &); TQDomNode::NodeType nodeType() const; bool isComment() const; }; class TQDomCDATASection : TQDomText { %TypeHeaderCode #include %End public: TQDomCDATASection(); TQDomCDATASection(const TQDomCDATASection&); TQDomNode::NodeType nodeType() const; bool isCDATASection() const; }; class TQDomNotation : TQDomNode { %TypeHeaderCode #include %End public: TQDomNotation(); TQDomNotation(const TQDomNotation &); TQString publicId() const; TQString systemId() const; TQDomNode::NodeType nodeType() const; bool isNotation() const; }; class TQDomEntity : TQDomNode { %TypeHeaderCode #include %End public: TQDomEntity(); TQDomEntity(const TQDomEntity &); virtual TQString publicId() const; virtual TQString systemId() const; virtual TQString notationName() const; TQDomNode::NodeType nodeType() const; bool isEntity() const; }; class TQDomEntityReference : TQDomNode { %TypeHeaderCode #include %End public: TQDomEntityReference(); TQDomEntityReference(const TQDomEntityReference &); TQDomNode::NodeType nodeType() const; bool isEntityReference() const; }; class TQDomProcessingInstruction : TQDomNode { %TypeHeaderCode #include %End public: TQDomProcessingInstruction(); TQDomProcessingInstruction(const TQDomProcessingInstruction &); virtual TQString target() const; virtual TQString data() const; virtual void setData(const TQString &); TQDomNode::NodeType nodeType() const; bool isProcessingInstruction() const; }; %End %End