ajdom.c


Function ajDomNodeListGetLen

Return the length of a DOM node list

Prototype

ajint ajDomNodeListGetLen (
      const AjPDomNodeList list
);

TypeNameRead/WriteDescription
const AjPDomNodeListlistInputnode list
ajint RETURNLength (-1 if error)

From EMBOSS 6.3.0


Function ajDomNodeListAppend

Append a child node to a DOM node list

Prototype

AjPDomNodeEntry ajDomNodeListAppend (
      AjPDomNodeList list,
      AjPDomNode child
);

TypeNameRead/WriteDescription
AjPDomNodeListlistOutputnode list
AjPDomNodechildModifychild
AjPDomNodeEntry RETURNNode list child entry created

From EMBOSS 4.0.0


Function ajDomNodeAppendChild

Appends an extra child at the end of the child nodes list of a node. If extrachild is already in the list, it is first removed.

Prototype

AjPDomNode ajDomNodeAppendChild (
      AjPDomNode node,
      AjPDomNode extrachild
);

TypeNameRead/WriteDescription
AjPDomNodenodeOutputnode
AjPDomNodeextrachildModifyextra child
AjPDomNode RETURNPointer to extrachild or NULL if error

From EMBOSS 4.0.0


Function ajDomRemoveChild

Removes a child node from a list of children

Prototype

AjPDomNode ajDomRemoveChild (
      AjPDomNode node,
      AjPDomNode child
);

TypeNameRead/WriteDescription
AjPDomNodenodeOutputnode
AjPDomNodechildModifychild to remove
AjPDomNode RETURNchild removed

From EMBOSS 4.0.0


Function ajDomNodeListExists

Check whether a child exists in a node list

Prototype

AjBool ajDomNodeListExists (
      AjPDomNodeList list,
      const AjPDomNode child
);

TypeNameRead/WriteDescription
AjPDomNodeListlistModifylist
const AjPDomNodechildInputchild
AjBool RETURNtrue if child is in the list

From EMBOSS 4.0.0


Function ajDomNodeListRemove

Remove a child from a node list

Prototype

AjPDomNodeEntry ajDomNodeListRemove (
      AjPDomNodeList list,
      AjPDomNode child
);

TypeNameRead/WriteDescription
AjPDomNodeListlistOutputlist
AjPDomNodechildModifychild
AjPDomNodeEntry RETURNchild removed or NULL if not found

From EMBOSS 4.0.0


Function ajDomDocumentDestroyNode

Frees a node and its children

Prototype

void ajDomDocumentDestroyNode (
      AjPDomDocument doc,
      AjPDomNode* Pnode
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
AjPDomNode*PnodeDeletenode
void RETURN

From EMBOSS 4.0.0


Function ajDomDocumentDestroyNodeList

Frees a node list

Prototype

void ajDomDocumentDestroyNodeList (
      AjPDomDocument doc,
      AjPDomNodeList* Plist,
      AjBool donodes
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
AjPDomNodeList*PlistDeletelist
AjBooldonodesInputfree nodes as well if true
void RETURN

From EMBOSS 4.0.0


Function ajDomCreateNodeList

Create a node list

Prototype

AjPDomNodeList ajDomCreateNodeList (
      AjPDomDocument doc
);

TypeNameRead/WriteDescription
AjPDomDocumentdocModifydocument
AjPDomNodeList RETURNnew list

From EMBOSS 4.0.0


Function ajDomDocumentCreateNode

General document node creation

Prototype

AjPDomNode ajDomDocumentCreateNode (
      AjPDomDocument doc,
      AjEDomNodeType nodetype
);

TypeNameRead/WriteDescription
AjPDomDocumentdocModifydocument
AjEDomNodeTypenodetypeModifyAJAX DOM Node Type enumeration
AjPDomNode RETURNnew node

From EMBOSS 4.0.0


Function ajDomImplementationCreateDocumentType

Creates an empty DocumentType node into which entities/notations (etc) can be placed

Prototype

AjPDomDocumentType ajDomImplementationCreateDocumentType (
      const AjPStr qualname,
      const AjPStr publicid,
      const AjPStr systemid
);

TypeNameRead/WriteDescription
const AjPStrqualnameInputqualified name
const AjPStrpublicidInputpublic id
const AjPStrsystemidInputsystemid
AjPDomDocumentType RETURNnew DocumentType node

From EMBOSS 4.0.0


Function ajDomImplementationCreateDocumentTypeC

Creates an empty DocumentType node into which entities/notations (etc) can be placed

Prototype

AjPDomDocumentType ajDomImplementationCreateDocumentTypeC (
      const char* qualname,
      const char* publicid,
      const char* systemid
);

TypeNameRead/WriteDescription
const char*qualnameInputqualified name
const char*publicidInputpublic id
const char*systemidInputsystemid
AjPDomDocumentType RETURNnew DocumentType node

From EMBOSS 4.0.0


Function ajDomImplementationCreateDocument

Creates an XML Document object of the specified type with its document element.

Prototype

AjPDomDocument ajDomImplementationCreateDocument (
      const AjPStr uri,
      const AjPStr qualname,
      AjPDomDocumentType doctype
);

TypeNameRead/WriteDescription
const AjPStruriInputuri (not implemented. Pass NULL)
const AjPStrqualnameInputqualified name
AjPDomDocumentTypedoctypeModifydoctype
AjPDomDocument RETURNnew document

From EMBOSS 4.0.0


Function ajDomImplementationCreateDocumentC

Creates an XML Document object of the specified type with its document element.

Prototype

AjPDomDocument ajDomImplementationCreateDocumentC (
      const char* uri,
      const char* qualname,
      AjPDomDocumentType doctype
);

TypeNameRead/WriteDescription
const char*uriInputuri (not implemented. Pass NULL)
const char*qualnameInputqualified name
AjPDomDocumentTypedoctypeModifydoctype
AjPDomDocument RETURNnew document

From EMBOSS 4.0.0


Function ajDomNodeMapGetItem

Returns the named node from a node map

Prototype

AjPDomNode ajDomNodeMapGetItem (
      const AjPDomNodeMap map,
      const AjPStr name
);

TypeNameRead/WriteDescription
const AjPDomNodeMapmapInputmap
const AjPStrnameInputname
AjPDomNode RETURNnode

From EMBOSS 4.0.0


Function ajDomNodeMapGetItemC

Returns the named node from a node map

Prototype

AjPDomNode ajDomNodeMapGetItemC (
      const AjPDomNodeMap map,
      const char* name
);

TypeNameRead/WriteDescription
const AjPDomNodeMapmapInputmap
const char*nameInputname
AjPDomNode RETURNnode

From EMBOSS 4.0.0


Function ajDomElementGetAttribute

Returns the value of a named attribute

Prototype

AjPStr ajDomElementGetAttribute (
      const AjPDomElement element,
      const AjPStr name
);

TypeNameRead/WriteDescription
const AjPDomElementelementInputelement
const AjPStrnameInputname
AjPStr RETURNvalue or empty string

From EMBOSS 4.0.0


Function ajDomElementGetAttributeC

Returns the value of a named attribute

Prototype

AjPStr ajDomElementGetAttributeC (
      const AjPDomElement element,
      const char* name
);

TypeNameRead/WriteDescription
const AjPDomElementelementInputelement
const char*nameInputname
AjPStr RETURNvalue or empty string

From EMBOSS 4.0.0


Function ajDomNodeMapSetItem

Enter arg into the node map using name as the key. If a node with the same name already exists in the map it will be replaced with the new node and returned. The replaced node should usually be freed with DestroyNode.

Prototype

AjPDomNode ajDomNodeMapSetItem (
      AjPDomNodeMap map,
      AjPDomNode arg
);

TypeNameRead/WriteDescription
AjPDomNodeMapmapModifymap
AjPDomNodeargModifyarg
AjPDomNode RETURNreplaced node or NULL

From EMBOSS 4.0.0


Function ajDomNodeMapRemoveItem

Removes and returns item from a map

Prototype

AjPDomNode ajDomNodeMapRemoveItem (
      AjPDomNodeMap map,
      const AjPStr name
);

TypeNameRead/WriteDescription
AjPDomNodeMapmapModifymap
const AjPStrnameInputname
AjPDomNode RETURNremoved node or NULL

From EMBOSS 4.0.0


Function ajDomNodeMapRemoveItemC

Removes and returns item from a map

Prototype

AjPDomNode ajDomNodeMapRemoveItemC (
      AjPDomNodeMap map,
      const char* name
);

TypeNameRead/WriteDescription
AjPDomNodeMapmapOutputmap
const char*nameInputname
AjPDomNode RETURNremoved node or NULL

From EMBOSS 4.0.0


Function ajDomNodeMapItem

Return the node in the map at a given index

Prototype

AjPDomNode ajDomNodeMapItem (
      const AjPDomNodeMap map,
      ajint indexnum
);

TypeNameRead/WriteDescription
const AjPDomNodeMapmapInputmap
ajintindexnumInputindex
AjPDomNode RETURNnode or NULL

From EMBOSS 4.0.0


Function ajDomNodeListItem

Return the node in the list at a given index

Prototype

AjPDomNode ajDomNodeListItem (
      const AjPDomNodeList list,
      ajint indexnum
);

TypeNameRead/WriteDescription
const AjPDomNodeListlistInputlist
ajintindexnumInputindex
AjPDomNode RETURNnode or NULL

From EMBOSS 4.0.0


Function ajDomElementSetAttribute

Adds a new attribute or sets the value of an existing attribute.

Prototype

void ajDomElementSetAttribute (
      const AjPDomElement element,
      const AjPStr name,
      const AjPStr value
);

TypeNameRead/WriteDescription
const AjPDomElementelementInputelement
const AjPStrnameInputname
const AjPStrvalueInputvalue
void RETURN

From EMBOSS 4.0.0


Function ajDomElementSetAttributeC

Adds a new attribute or sets the value of an existing attribute.

Prototype

void ajDomElementSetAttributeC (
      const AjPDomElement element,
      const char* name,
      const char* value
);

TypeNameRead/WriteDescription
const AjPDomElementelementInputelement
const char*nameInputname
const char*valueInputvalue
void RETURN

From EMBOSS 4.0.0


Function ajDomElementRemoveAttribute

Remove and free a named attribute

Prototype

void ajDomElementRemoveAttribute (
      AjPDomElement element,
      const AjPStr name
);

TypeNameRead/WriteDescription
AjPDomElementelementModifyelement
const AjPStrnameInputname
void RETURN

From EMBOSS 4.0.0


Function ajDomElementRemoveAttributeC

Remove and free a named attribute

Prototype

void ajDomElementRemoveAttributeC (
      AjPDomElement element,
      const char* name
);

TypeNameRead/WriteDescription
AjPDomElementelementModifyelement
const char*nameInputname
void RETURN

From EMBOSS 4.0.0


Function ajDomElementGetAttributeNode

Returns the named attribute node.

Prototype

AjPDomNode ajDomElementGetAttributeNode (
      const AjPDomElement element,
      const AjPStr name
);

TypeNameRead/WriteDescription
const AjPDomElementelementInputelement
const AjPStrnameInputname
AjPDomNode RETURNnode or NULL

From EMBOSS 4.0.0


Function ajDomElementGetAttributeNodeC

Returns the named attribute node.

Prototype

AjPDomNode ajDomElementGetAttributeNodeC (
      const AjPDomElement element,
      const char* name
);

TypeNameRead/WriteDescription
const AjPDomElementelementInputelement
const char*nameInputname
AjPDomNode RETURNnode or NULL

From EMBOSS 4.0.0


Function ajDomElementSetAttributeNode

Add an attribute to the attributes of an element. If this element already has an attribute with the same name it will be replaced with the new attribute and returned.

Prototype

AjPDomNode ajDomElementSetAttributeNode (
      AjPDomElement element,
      AjPDomNode newattr
);

TypeNameRead/WriteDescription
AjPDomElementelementModifyelement
AjPDomNodenewattrModifyname
AjPDomNode RETURNnew or replaced attribute

From EMBOSS 4.0.0


Function ajDomElementRemoveAttributeNode

Removes and returns a pointer to an attribute

Prototype

AjPDomNode ajDomElementRemoveAttributeNode (
      AjPDomElement element,
      AjPDomNode oldattr
);

TypeNameRead/WriteDescription
AjPDomElementelementOutputelement
AjPDomNodeoldattrModifyattribute
AjPDomNode RETURNremoved attribute or NULL

From EMBOSS 4.0.0


Function ajDomElementGetElementsByTagName

Perform a pre-order traversal of the entire document. Return a node list of the elements with the name tagname in the order in which they are found.

Prototype

AjPDomNodeList ajDomElementGetElementsByTagName (
      AjPDomElement element,
      const AjPStr name
);

TypeNameRead/WriteDescription
AjPDomElementelementModifyelement
const AjPStrnameInputname
AjPDomNodeList RETURNnode list

From EMBOSS 4.0.0


Function ajDomElementGetElementsByTagNameC

Perform a pre-order traversal of the entire document. Return a node list of the elements with the name tagname in the order in which they are found.

Prototype

AjPDomNodeList ajDomElementGetElementsByTagNameC (
      AjPDomElement element,
      const char* name
);

TypeNameRead/WriteDescription
AjPDomElementelementModifyelement
const char*nameInputname
AjPDomNodeList RETURNnode list

From EMBOSS 4.0.0


Function ajDomElementNormalise

Merge adjacent text node content into "normal" form in the subtree of a node. Remove empty text node.

Prototype

void ajDomElementNormalise (
      AjPDomElement element
);

TypeNameRead/WriteDescription
AjPDomElementelementOutputelement
void RETURN

From EMBOSS 4.0.0


Function ajDomCharacterDataSubstringData

Return a string representing the substring beginning at the character at offset with a length of count. If the sum of offset and count exceeds the length of the character data, a string representing the remainder of the string is returned.

Prototype

AjPStr ajDomCharacterDataSubstringData (
      const AjPDomCharacterData data,
      ajint offset,
      ajint count
);

TypeNameRead/WriteDescription
const AjPDomCharacterDatadataInputcharacter data
ajintoffsetInputoffset
ajintcountInputcount
AjPStr RETURNsubstring

From EMBOSS 4.0.0


Function ajDomCharacterDataAppendData

Append a string to a character data node

Prototype

void ajDomCharacterDataAppendData (
      AjPDomCharacterData data,
      const AjPStr arg
);

TypeNameRead/WriteDescription
AjPDomCharacterDatadataOutputcharacter data
const AjPStrargInputstring
void RETURN

From EMBOSS 4.0.0


Function ajDomCharacterDataAppendDataC

Append a string to a character data node

Prototype

void ajDomCharacterDataAppendDataC (
      AjPDomCharacterData data,
      const char* arg
);

TypeNameRead/WriteDescription
AjPDomCharacterDatadataOutputcharacter data
const char*argInputstring
void RETURN

From EMBOSS 4.0.0


Function ajDomCharacterDataInsertData

Insert a string at position offset

Prototype

void ajDomCharacterDataInsertData (
      AjPDomCharacterData data,
      ajint offset,
      const AjPStr arg
);

TypeNameRead/WriteDescription
AjPDomCharacterDatadataOutputcharacter data
ajintoffsetInputoffset
const AjPStrargInputstring
void RETURN

From EMBOSS 4.0.0


Function ajDomCharacterDataInsertDataC

Insert a string at position offset

Prototype

void ajDomCharacterDataInsertDataC (
      AjPDomCharacterData data,
      ajint offset,
      const char* arg
);

TypeNameRead/WriteDescription
AjPDomCharacterDatadataOutputcharacter data
ajintoffsetInputoffset
const char*argInputstring
void RETURN

From EMBOSS 4.0.0


Function ajDomCharacterDataDeleteData

Remove at most count characters of position offset

Prototype

void ajDomCharacterDataDeleteData (
      AjPDomCharacterData data,
      ajint offset,
      ajint count
);

TypeNameRead/WriteDescription
AjPDomCharacterDatadataOutputcharacter data
ajintoffsetInputoffset
ajintcountInputcount
void RETURN

From EMBOSS 4.0.0


Function ajDomCharacterDataReplaceData

Replace offset/count characters with a string

Prototype

void ajDomCharacterDataReplaceData (
      AjPDomCharacterData data,
      ajint offset,
      ajint count,
      const AjPStr arg
);

TypeNameRead/WriteDescription
AjPDomCharacterDatadataOutputcharacter data
ajintoffsetInputoffset
ajintcountInputcount
const AjPStrargInputreplacement string
void RETURN

From EMBOSS 4.0.0


Function ajDomCharacterDataReplaceDataC

Replace offset/count characters with a string

Prototype

void ajDomCharacterDataReplaceDataC (
      AjPDomCharacterData data,
      ajint offset,
      ajint count,
      const char* arg
);

TypeNameRead/WriteDescription
AjPDomCharacterDatadataOutputcharacter data
ajintoffsetInputoffset
ajintcountInputcount
const char*argInputreplacement string
void RETURN

From EMBOSS 4.0.0


Function ajDomCharacterDataGetLength

Return length of character data

Prototype

ajint ajDomCharacterDataGetLength (
      const AjPDomCharacterData data
);

TypeNameRead/WriteDescription
const AjPDomCharacterDatadataInputcharacter data
ajint RETURNlength

From EMBOSS 4.0.0


Function ajDomTextSplitText

Split a text node at the specified offset into two adjacent text nodes. The first is a string offset size in length whereas the second is the remainder. If offset is equal to the length of the string the new sibling has zero length

Prototype

AjPDomText ajDomTextSplitText (
      AjPDomText text,
      ajint offset
);

TypeNameRead/WriteDescription
AjPDomTexttextOutputtext
ajintoffsetInputoffset
AjPDomText RETURNremainder node or NULL

From EMBOSS 4.0.0


Function ajDomDocumentCreateElement

Create a document element

Prototype

AjPDomElement ajDomDocumentCreateElement (
      AjPDomDocument doc,
      const AjPStr tagname
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const AjPStrtagnameInputtagname
AjPDomElement RETURNelement

From EMBOSS 4.0.0


Function ajDomDocumentCreateElementC

Create a document element

Prototype

AjPDomElement ajDomDocumentCreateElementC (
      AjPDomDocument doc,
      const char* tagname
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const char*tagnameInputtagname
AjPDomElement RETURNelement

From EMBOSS 4.0.0


Function ajDomDocumentCreateDocumentFragment

Create an empty document fragment

Prototype

AjPDomDocumentFragment ajDomDocumentCreateDocumentFragment (
      AjPDomDocument doc
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
AjPDomDocumentFragment RETURNfragment

From EMBOSS 4.0.0


Function ajDomDocumentCreateTextNode

Create a text node

Prototype

AjPDomText ajDomDocumentCreateTextNode (
      AjPDomDocument doc,
      const AjPStr data
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const AjPStrdataInputtext
AjPDomText RETURNtext node

From EMBOSS 4.0.0


Function ajDomDocumentCreateTextNodeC

Create a text node

Prototype

AjPDomText ajDomDocumentCreateTextNodeC (
      AjPDomDocument doc,
      const char* data
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const char*dataInputtext
AjPDomText RETURNtext node

From EMBOSS 4.0.0


Function ajDomDocumentCreateComment

Create a comment node

Prototype

AjPDomComment ajDomDocumentCreateComment (
      AjPDomDocument doc,
      const AjPStr data
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const AjPStrdataInputtext
AjPDomComment RETURNcomment node

From EMBOSS 4.0.0


Function ajDomDocumentCreateCommentC

Create a comment node

Prototype

AjPDomComment ajDomDocumentCreateCommentC (
      AjPDomDocument doc,
      const char* data
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const char*dataInputtext
AjPDomComment RETURNcomment node

From EMBOSS 4.0.0


Function ajDomDocumentCreateCDATASection

Create a CDATA section

Prototype

AjPDomCDATASection ajDomDocumentCreateCDATASection (
      AjPDomDocument doc,
      const AjPStr data
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const AjPStrdataInputtext
AjPDomCDATASection RETURNcomment node

From EMBOSS 4.0.0


Function ajDomDocumentCreateCDATASectionC

Create a CDATA section

Prototype

AjPDomCDATASection ajDomDocumentCreateCDATASectionC (
      AjPDomDocument doc,
      const char* data
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const char*dataInputtext
AjPDomCDATASection RETURNcomment node

From EMBOSS 4.0.0


Function ajDomDocumentCreateAttribute

Create an attribute node

Prototype

AjPDomAttr ajDomDocumentCreateAttribute (
      AjPDomDocument doc,
      const AjPStr name
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const AjPStrnameInputtext
AjPDomAttr RETURNattribute node

From EMBOSS 4.0.0


Function ajDomDocumentCreateAttributeC

Create an attribute node

Prototype

AjPDomAttr ajDomDocumentCreateAttributeC (
      AjPDomDocument doc,
      const char* name
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const char*nameInputtext
AjPDomAttr RETURNattribute node

From EMBOSS 4.0.0


Function ajDomDocumentCreateEntityReference

Create an entity reference node

Prototype

AjPDomEntityReference ajDomDocumentCreateEntityReference (
      AjPDomDocument doc,
      const AjPStr name
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const AjPStrnameInputtext
AjPDomEntityReference RETURNentity reference node

From EMBOSS 4.0.0


Function ajDomDocumentCreateEntityReferenceC

Create an entity reference node

Prototype

AjPDomEntityReference ajDomDocumentCreateEntityReferenceC (
      AjPDomDocument doc,
      const char* name
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const char*nameInputtext
AjPDomEntityReference RETURNentity reference node

From EMBOSS 4.0.0


Function ajDomDocumentCreateProcessingInstruction

Create a processing instruction node

Prototype

AjPDomPi ajDomDocumentCreateProcessingInstruction (
      AjPDomDocument doc,
      const AjPStr target,
      const AjPStr data
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const AjPStrtargetInputtarget
const AjPStrdataInputdata
AjPDomPi RETURNentity reference node

From EMBOSS 4.0.0


Function ajDomDocumentCreateProcessingInstructionC

Create a processing instruction node

Prototype

AjPDomPi ajDomDocumentCreateProcessingInstructionC (
      AjPDomDocument doc,
      const char* target,
      const char* data
);

TypeNameRead/WriteDescription
AjPDomDocumentdocOutputdocument
const char*targetInputtarget
const char*dataInputdata
AjPDomPi RETURNentity reference node

From EMBOSS 4.0.0


Function ajDomDocumentGetElementsByTagName

Perform a pre-order traversal of the entire document. Return a node list of the elements matching tagname in the order in which they are found.

Prototype

AjPDomNodeList ajDomDocumentGetElementsByTagName (
      AjPDomDocument doc,
      const AjPStr name
);

TypeNameRead/WriteDescription
AjPDomDocumentdocModifydocument
const AjPStrnameInputname
AjPDomNodeList RETURNnode list

From EMBOSS 4.0.0


Function ajDomDocumentGetElementsByTagNameC

Perform a pre-order traversal of the entire document. Return a node list of the elements matching tagname in the order in which they are found.

Prototype

AjPDomNodeList ajDomDocumentGetElementsByTagNameC (
      AjPDomDocument doc,
      const char* name
);

TypeNameRead/WriteDescription
AjPDomDocumentdocModifydocument
const char*nameInputname
AjPDomNodeList RETURNnode list

From EMBOSS 4.0.0


Function ajDomDocumentGetDoctype

Get document type

Prototype

AjPDomDocumentType ajDomDocumentGetDoctype (
      const AjPDomDocument doc
);

TypeNameRead/WriteDescription
const AjPDomDocumentdocInputdocument
AjPDomDocumentType RETURNdoctype

From EMBOSS 4.0.0


Function ajDomDocumentGetDocumentElement

Get the root element of the document tree. The root element is also accessible through the child nodes node list member, however the children of a document may also be processing instructions, document type nodes, and comments which may precede the document element in the list.

Prototype

AjPDomElement ajDomDocumentGetDocumentElement (
      const AjPDomDocument doc
);

TypeNameRead/WriteDescription
const AjPDomDocumentdocInputdocument
AjPDomElement RETURNroot element

From EMBOSS 4.0.0


Function ajDomPrintNode

Print a node with indentation

Prototype

void ajDomPrintNode (
      const AjPDomNode node,
      ajint indent
);

TypeNameRead/WriteDescription
const AjPDomNodenodeInputnode
ajintindentInputindentation
void RETURN

From EMBOSS 4.0.0


Function ajDomPrintNode2

Print a node with zero indentation

Prototype

void ajDomPrintNode2 (
      const AjPDomNode node
);

TypeNameRead/WriteDescription
const AjPDomNodenodeInputnode
void RETURN

From EMBOSS 4.0.0


Function ajDomNodePrintNode

Print a node internals

Prototype

void ajDomNodePrintNode (
      const AjPDomNode node
);

TypeNameRead/WriteDescription
const AjPDomNodenodeInputnode
void RETURN

From EMBOSS 4.0.0


Function ajDomNodeInsertBefore

Insert newchild into node directly before the existing child refchild. If refchild is a null pointer, newchild will be appended to the list. If newchild is a fragment node, all children are moved into this node in the same order before refchild. If newchild is already in the list it will first be removed.

Prototype

AjPDomNode ajDomNodeInsertBefore (
      AjPDomNode node,
      AjPDomNode newchild,
      AjPDomNode refchild
);

TypeNameRead/WriteDescription
AjPDomNodenodeOutputnode
AjPDomNodenewchildModifynode to insert
AjPDomNoderefchildModifynode to insert before
AjPDomNode RETURNinserted node

From EMBOSS 4.0.0


Function ajDomNodeListInsert

Insert newchild into list directly before the existing child refchild.

Prototype

AjPDomNodeEntry ajDomNodeListInsert (
      AjPDomNodeList list,
      AjPDomNode newchild,
      AjPDomNode refchild
);

TypeNameRead/WriteDescription
AjPDomNodeListlistModifylist
AjPDomNodenewchildModifynode to insert
AjPDomNoderefchildModifynode to insert before
AjPDomNodeEntry RETURNinserted node

From EMBOSS 4.0.0


Function ajDomNodeReplaceChild

Replace oldchild with newchild in the list of children.

Prototype

AjPDomNode ajDomNodeReplaceChild (
      AjPDomNode node,
      AjPDomNode newchild,
      AjPDomNode oldchild
);

TypeNameRead/WriteDescription
AjPDomNodenodeModifynode
AjPDomNodenewchildModifynode to insert
AjPDomNodeoldchildModifynode to replace
AjPDomNode RETURNoldchild node

From EMBOSS 4.0.0


Function ajDomNodeListReplace

Replace oldchild with newchild in a node list.

Prototype

AjPDomNodeEntry ajDomNodeListReplace (
      AjPDomNodeList list,
      AjPDomNode newchild,
      AjPDomNode oldchild
);

TypeNameRead/WriteDescription
AjPDomNodeListlistModifylist
AjPDomNodenewchildModifynode to insert
AjPDomNodeoldchildModifynode to replace
AjPDomNodeEntry RETURNinserted node

From EMBOSS 4.0.0


Function ajDomNodeCloneNode

Clone node

Prototype

AjPDomNode ajDomNodeCloneNode (
      AjPDomNode node,
      AjBool deep
);

TypeNameRead/WriteDescription
AjPDomNodenodeModifynode to clone
AjBooldeepInputdo a deep clone
AjPDomNode RETURNclone

From EMBOSS 4.0.0


Function ajDomNodeHasChildNodes

Check whether a node has any children

Prototype

AjBool ajDomNodeHasChildNodes (
      const AjPDomNode node
);

TypeNameRead/WriteDescription
const AjPDomNodenodeInputnode to clone
AjBool RETURNtrue if children

From EMBOSS 4.0.0


Function ajDomWrite

Write XML from memory

Prototype

ajint ajDomWrite (
      const AjPDomDocument node,
      AjPFile outf
);

TypeNameRead/WriteDescription
const AjPDomDocumentnodeInputdocument to write
AjPFileoutfModifyoutput file
ajint RETURNzero OK, negative if error

From EMBOSS 4.0.0


Function ajDomWriteIndent

Write XML from memory

Prototype

ajint ajDomWriteIndent (
      const AjPDomDocument node,
      AjPFile outf,
      ajint indent
);

TypeNameRead/WriteDescription
const AjPDomDocumentnodeInputdocument to write
AjPFileoutfModifyoutput file
ajintindentInputindent level
ajint RETURNPositive OK, zero OK but no additional output, negative if error

From EMBOSS 4.1.0


Function ajDomReadFp

Read XML into memory from a file pointer

Prototype

ajint ajDomReadFp (
      AjPDomDocument node,
      FILE* stream
);

TypeNameRead/WriteDescription
AjPDomDocumentnodeModifydocument to write
FILE*streamModifystream
ajint RETURNzero OK, negative if error

From EMBOSS 6.3.0


Function ajDomReadFilebuff

Read XML into memory from a file pointer

Prototype

ajint ajDomReadFilebuff (
      AjPDomDocument node,
      AjPFilebuff buff
);

TypeNameRead/WriteDescription
AjPDomDocumentnodeModifydocument to write
AjPFilebuffbuffModifyFile buffer
ajint RETURNzero OK, negative if error

From EMBOSS 6.3.0


Function ajDomReadFilebuffText

Read XML into memory from a file pointer

Prototype

ajint ajDomReadFilebuffText (
      AjPDomDocument node,
      AjPFilebuff buff,
      AjBool dotext,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPDomDocumentnodeModifydocument to write
AjPFilebuffbuffModifyFile buffer
AjBooldotextInputIf true, save input text to string
AjPStr*PstrModifyText save buffer
ajint RETURNzero OK, negative if error

From EMBOSS 6.6.0


Function ajDomReadString

Read XML into memory from a string

Prototype

ajint ajDomReadString (
      AjPDomDocument node,
      AjPStr str
);

TypeNameRead/WriteDescription
AjPDomDocumentnodeModifydocument to write
AjPStrstrModifyXML string
ajint RETURNzero OK, negative if error

From EMBOSS 6.3.0


Function ajDomTextGetText

Return the text from a text node

Prototype

AjPStr ajDomTextGetText (
      AjPDomText text
);

TypeNameRead/WriteDescription
AjPDomTexttextOutputtext
AjPStr RETURNtext or NULL

From EMBOSS 6.4.0


Function ajDomElementGetText

Return the text from an element node

Prototype

AjPStr ajDomElementGetText (
      AjPDomElement element
);

TypeNameRead/WriteDescription
AjPDomElementelementOutputelement
AjPStr RETURNtext or NULL

From EMBOSS 6.4.0


Function ajDomElementGetNthChildByTagNameC

Returns the nth child of a named element

Prototype

AjPDomElement ajDomElementGetNthChildByTagNameC (
      AjPDomDocument doc,
      AjPDomElement element,
      const char* name,
      ajint n
);

TypeNameRead/WriteDescription
AjPDomDocumentdocModifydoc
AjPDomElementelementModifyelement
const char*nameInputelement name
ajintnInputnumber of child to get
AjPDomElement RETURNchild or NULL

From EMBOSS 6.4.0


Function ajDomElementGetFirstChildByTagNameC

Returns the 1st child of a named element

Prototype

AjPDomElement ajDomElementGetFirstChildByTagNameC (
      AjPDomDocument doc,
      AjPDomElement element,
      const char* name
);

TypeNameRead/WriteDescription
AjPDomDocumentdocModifydoc
AjPDomElementelementModifyelement
const char*nameInputelement name
AjPDomElement RETURNchild or NULL

From EMBOSS 6.4.0