diff options
| author | daleharvey <daleharvey@users.sourceforge.net> | 2006-08-01 14:23:19 +0000 |
|---|---|---|
| committer | daleharvey <daleharvey@users.sourceforge.net> | 2006-08-01 14:23:19 +0000 |
| commit | 1aca339eb4de8184928b1a7c1a5ce60166f9a531 (patch) | |
| tree | c5d7053acdc3d7fe33f646b733eb12052ba1d3e5 /src | |
| parent | change HAVE_PANGO_CAIRO to RENDER_WITH_PANGO_CAIRO (diff) | |
| download | inkscape-1aca339eb4de8184928b1a7c1a5ce60166f9a531.tar.gz inkscape-1aca339eb4de8184928b1a7c1a5ce60166f9a531.zip | |
added getFirstChild() and exists() to pedrodom
(bzr r1537)
Diffstat (limited to 'src')
| -rw-r--r-- | src/pedro/pedrodom.h | 5 |
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 |
