xmldomnode.h
// Copyright (c) 2002 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_XMLDOMNODE_H
#define RUDIMENTS_XMLDOMNODE_H
#include <rudiments/private/xmldomnodeincludes.h>
enum xmldomnodetype {
NULL_XMLDOMNODETYPE=0,
ROOT_XMLDOMNODETYPE,
TAG_XMLDOMNODETYPE,
ATTRIBUTE_XMLDOMNODETYPE,
TEXT_XMLDOMNODETYPE,
COMMENT_XMLDOMNODETYPE,
CDATA_XMLDOMNODETYPE
};
class xmldom;
class xmldomnodeprivate;
class RUDIMENTS_DLLSPEC xmldomnode {
public:
xmldomnode(xmldom *dom, xmldomnode *nullnode);
xmldomnode(xmldom *dom,
xmldomnode *nullnode,
xmldomnodetype type,
const char *name,
const char *value);
xmldomnode(xmldom *dom,
xmldomnode *nullnode,
xmldomnodetype type,
const char *ns,
const char *name,
const char *value);
~xmldomnode();
static xmldomnode *createNullNode(xmldom *dom);
void cascadeOnDelete();
void dontCascadeOnDelete();
xmldomnodetype getType() const;
const char *getNamespace() const;
const char *getName() const;
const char *getValue() const;
xmldom *getTree() const;
xmldomnode *getParent() const;
uint64_t getPosition() const;
xmldomnode *getPreviousSibling() const;
xmldomnode *getPreviousTagSibling() const;
xmldomnode *getPreviousTagSibling(const char *name) const;
xmldomnode *getPreviousTagSibling(
const char *ns,
const char *name) const;
xmldomnode *getPreviousTagSiblingIgnoringCase(
const char *name) const;
xmldomnode *getPreviousTagSiblingIgnoringCase(
const char *ns,
const char *name) const;
xmldomnode *getPreviousTagSibling(
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getPreviousTagSibling(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getPreviousTagSiblingIgnoringCase(
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getPreviousTagSiblingIgnoringCase(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getNextSibling() const;
xmldomnode *getNextTagSibling() const;
xmldomnode *getNextTagSibling(const char *name) const;
xmldomnode *getNextTagSibling(const char *ns,
const char *name) const;
xmldomnode *getNextTagSiblingIgnoringCase(
const char *name) const;
xmldomnode *getNextTagSiblingIgnoringCase(
const char *ns,
const char *name) const;
xmldomnode *getNextTagSibling(
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getNextTagSibling(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getNextTagSiblingIgnoringCase(
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getNextTagSiblingIgnoringCase(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getNextTagSiblingInSet(
const char * const *set) const;
xmldomnode *getNextTagSiblingInSet(
const char *ns,
const char * const *set) const;
uint64_t getChildCount() const;
xmldomnode *getFirstChild(const char *name) const;
xmldomnode *getFirstChild(const char *ns,
const char *name) const;
xmldomnode *getFirstChildIgnoringCase(
const char *name) const;
xmldomnode *getFirstChildIgnoringCase(
const char *ns,
const char *name) const;
xmldomnode *getChild(uint64_t position) const;
xmldomnode *getFirstChild(const char *name,
const char *attributename,
const char *attributevalue)
const;
xmldomnode *getFirstChild(const char *ns,
const char *name,
const char *attributename,
const char *attributevalue)
const;
xmldomnode *getFirstChildIgnoringCase(
const char *name,
const char *attributename,
const char *attributevalue)
const;
xmldomnode *getFirstChildIgnoringCase(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue)
const;
xmldomnode *getFirstTagChild() const;
xmldomnode *getFirstTagChild(const char *name) const;
xmldomnode *getFirstTagChild(const char *ns,
const char *name) const;
xmldomnode *getFirstTagChildIgnoringCase(
const char *name) const;
xmldomnode *getFirstTagChildIgnoringCase(
const char *ns,
const char *name) const;
xmldomnode *getFirstTagChild(
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getFirstTagChild(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getFirstTagChildIgnoringCase(
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getFirstTagChildIgnoringCase(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getFirstTagChildInSet(
const char * const *set) const;
xmldomnode *getFirstTagChildInSet(
const char *ns,
const char * const *set) const;
xmldomnode *getFirstTagDescendent(const char *name) const;
xmldomnode *getFirstTagDescendent(
const char *ns,
const char *name) const;
xmldomnode *getFirstTagDescendentIgnoringCase(
const char *name) const;
xmldomnode *getFirstTagDescendentIgnoringCase(
const char *ns,
const char *name) const;
xmldomnode *getFirstTagDescendent(
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getFirstTagDescendent(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getFirstTagDescendentIgnoringCase(
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getFirstTagDescendentIgnoringCase(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue) const;
xmldomnode *getFirstTagDescendentInSet(
const char * const *set) const;
xmldomnode *getFirstTagDescendentInSet(
const char *ns,
const char * const *set) const;
xmldomnode *getNextTag() const;
xmldomnode *getNextTag(xmldomnode *top) const;
xmldomnode *getPreviousTag() const;
xmldomnode *getPreviousTag(xmldomnode *top) const;
uint64_t getAttributeCount() const;
xmldomnode *getAttribute(const char *name) const;
xmldomnode *getAttributeIgnoringCase(
const char *name) const;
xmldomnode *getAttribute(uint64_t position) const;
const char *getAttributeValue(const char *name) const;
const char *getAttributeValue(uint64_t position) const;
constnamevaluepairs *getAttributes() const;
void setAttributeValue(const char *name,
const char *value);
void setAttributeValue(const char *name,
int64_t value);
void setAttributeValue(const char *name,
uint64_t value);
xmldomnode *getNullNode() const;
bool isNullNode() const;
void setType(xmldomnodetype type);
void setNamespace(const char *ns);
void setName(const char *name);
void setName(const char *ns, const char *name);
void setValue(const char *value);
void setParent(xmldomnode *parent);
void setPreviousSibling(xmldomnode *previous);
void setNextSibling(xmldomnode *next);
bool insertChild(xmldomnode *child, uint64_t position);
bool appendChild(xmldomnode *child);
xmldomnode *insertTag(const char *tag, uint64_t position);
xmldomnode *insertTag(const char *ns,
const char *tag,
uint64_t position);
bool insertXml(const char *xml, uint64_t position);
bool insertXmlFile(const char *xmlfile, uint64_t position);
xmldomnode *appendTag(const char *tag);
xmldomnode *appendTag(const char *ns, const char *tag);
bool appendXml(const char *xml);
bool appendXmlFile(const char *xmlfile);
bool moveChild(xmldomnode *child,
xmldomnode *parent, uint64_t position);
bool deleteChild(uint64_t position);
bool deleteChild(xmldomnode *child);
bool deleteFirstChild(const char *name);
bool deleteFirstChild(const char *ns, const char *name);
bool deleteFirstChildIgnoringCase(const char *name);
bool deleteFirstChildIgnoringCase(const char *ns,
const char *name);
bool deleteFirstChild(const char *name,
const char *attributename,
const char *attributevalue);
bool deleteFirstChild(const char *ns,
const char *name,
const char *attributename,
const char *attributevalue);
bool deleteFirstChildIgnoringCase(
const char *name,
const char *attributename,
const char *attributevalue);
bool deleteFirstChildIgnoringCase(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue);
bool deleteChildren();
bool deleteChildren(const char *name);
bool deleteChildren(const char *ns, const char *name);
bool deleteChildrenIgnoringCase(const char *name);
bool deleteChildrenIgnoringCase(const char *ns,
const char *name);
bool deleteChildren(const char *name,
const char *attributename,
const char *attributevalue);
bool deleteChildren(const char *ns,
const char *name,
const char *attributename,
const char *attributevalue);
bool deleteChildrenIgnoringCase(
const char *name,
const char *attributename,
const char *attributevalue);
bool deleteChildrenIgnoringCase(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue);
bool deleteDescendents(const char *name);
bool deleteDescendents(const char *ns,
const char *name);
bool deleteDescendentsIgnoringCase(const char *name);
bool deleteDescendentsIgnoringCase(const char *ns,
const char *name);
bool deleteDescendents(const char *name,
const char *attributename,
const char *attributevalue);
bool deleteDescendents(const char *ns,
const char *name,
const char *attributename,
const char *attributevalue);
bool deleteDescendentsIgnoringCase(
const char *name,
const char *attributename,
const char *attributevalue);
bool deleteDescendentsIgnoringCase(
const char *ns,
const char *name,
const char *attributename,
const char *attributevalue);
bool renameFirstChild(const char *oldname,
const char *newname);
bool renameFirstChild(const char *oldns,
const char *oldname,
const char *newns,
const char *newname);
bool renameFirstChildIgnoringCase(const char *oldname,
const char *newname);
bool renameFirstChildIgnoringCase(const char *oldns,
const char *oldname,
const char *newns,
const char *newname);
bool renameChildren(const char *oldname,
const char *newname);
bool renameChildren(const char *oldns,
const char *oldname,
const char *newns,
const char *newname);
bool renameChildrenIgnoringCase(const char *oldname,
const char *newname);
bool renameChildrenIgnoringCase(const char *oldns,
const char *oldname,
const char *newns,
const char *newname);
bool renameDescendents(const char *oldname,
const char *newname);
bool renameDescendents(const char *oldns,
const char *oldname,
const char *newns,
const char *newname);
bool renameDescendentsIgnoringCase(
const char *oldname,
const char *newname);
bool renameDescendentsIgnoringCase(
const char *oldns,
const char *oldname,
const char *newns,
const char *newname);
bool insertText(const char *value, uint64_t position);
bool appendText(const char *value);
bool insertAttribute(xmldomnode *attribute,
uint64_t position);
bool appendAttribute(xmldomnode *attribute);
bool insertAttribute(const char *name, const char *value,
uint64_t position);
bool appendAttribute(const char *name, const char *value);
bool deleteAttribute(uint64_t position);
bool deleteAttribute(const char *name);
bool deleteAttribute(xmldomnode *attribute);
bool unwrapChild(xmldomnode *child);
bool unwrapFirstChild(const char *name);
bool unwrapFirstChild(const char *ns, const char *name);
bool unwrapFirstChildIgnoringCase(const char *name);
bool unwrapFirstChildIgnoringCase(const char *ns,
const char *name);
bool unwrapChildren(const char *name);
bool unwrapChildren(const char *ns, const char *name);
bool unwrapChildrenIgnoringCase(const char *name);
bool unwrapChildrenIgnoringCase(const char *ns,
const char *name);
bool unwrapDescendents(const char *name);
bool unwrapDescendents(const char *ns, const char *name);
bool unwrapDescendentsIgnoringCase(const char *name);
bool unwrapDescendentsIgnoringCase(const char *ns,
const char *name);
xmldomnode *wrapChild(xmldomnode *child,
const char *name);
xmldomnode *wrapChild(xmldomnode *child,
const char *ns,
const char *name);
xmldomnode *wrapChildren(xmldomnode *startchild,
xmldomnode *endchild,
const char *name);
xmldomnode *wrapChildren(xmldomnode *startchild,
xmldomnode *endchild,
const char *ns,
const char *name);
xmldomnode *wrapChildren(const char *name);
xmldomnode *wrapChildren(const char *ns, const char *name);
xmldomnode *clone();
xmldomnode *clone(xmldom *dom);
stringbuffer *xml() const;
void print(stringbuffer *strb) const;
void print(filedescriptor *fd) const;
stringbuffer *getPath() const;
xmldomnode *getChildByPath(const char *path) const;
xmldomnode *getAttributeByPath(const char *path,
uint64_t position) const;
xmldomnode *getAttributeByPath(const char *path,
const char *name) const;
const char *getAttributeValueByPath(const char *path,
uint64_t position) const;
const char *getAttributeValueByPath(const char *path,
const char *name) const;
void setData(void *data);
void *getData();
#include <rudiments/private/xmldomnode.h>
};
#endif
xmldomnode
Definition: xmldomnode.h:123
stringbuffer
Definition: stringbuffer.h:22
filedescriptor
Definition: filedescriptor.h:14
xmldom
Definition: xmldom.h:12