summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordaleharvey <daleharvey@users.sourceforge.net>2006-08-01 14:23:19 +0000
committerdaleharvey <daleharvey@users.sourceforge.net>2006-08-01 14:23:19 +0000
commit1aca339eb4de8184928b1a7c1a5ce60166f9a531 (patch)
treec5d7053acdc3d7fe33f646b733eb12052ba1d3e5 /src
parentchange HAVE_PANGO_CAIRO to RENDER_WITH_PANGO_CAIRO (diff)
downloadinkscape-1aca339eb4de8184928b1a7c1a5ce60166f9a531.tar.gz
inkscape-1aca339eb4de8184928b1a7c1a5ce60166f9a531.zip
added getFirstChild() and exists() to pedrodom
(bzr r1537)
Diffstat (limited to 'src')
-rw-r--r--src/pedro/pedrodom.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pedro/pedrodom.h b/src/pedro/pedrodom.h
index b9fb98b92..cc9a322f9 100644
--- a/src/pedro/pedrodom.h
+++ b/src/pedro/pedrodom.h
@@ -176,6 +176,9 @@ public:
Element *getParent()
{ return parent; }
+ Element *getFirstChild()
+ { return (children.size() == 0) ? NULL : children[0]; }
+
std::vector<Element *> getChildren()
{ return children; }
@@ -196,6 +199,8 @@ public:
void addNamespace(const DOMString &prefix, const DOMString &namespaceURI);
+ bool exists(const DOMString &name)
+ { return (findElements(name).size() > 0); }
/**
* Prettyprint an XML tree to an output stream. Elements are indented