My only quibble with "move" is that you're not moving anything, you're just
re-setting a pointer. Pedantic and a bit silly, I know, but for people
coming from JS/Java/Python etc, where you can just do: xml one =
parent.get("bar/baz[4]") and all that, I think it's important to be
specific about how we're doing it, because the document+element pointer in
a single object that C++ libs do (both Poco and Boost) really is a bit
weird compared to how other languages do XML/DOM parsing. I'm not
completely set on that though :)


On Tue, Jun 11, 2013 at 9:00 AM, Kyle McDonald <notifications@github.com>wrote:

> In libs/openFrameworks/types/ofXml.h:
>
> > +    bool            clearContents(const string& path);
> > +    bool            clearContents();
> > +
> > +    bool            remove(const string& path); // works for both attributes and tags
> > +    //bool            removeAll(const string& path); // works for both attributes and tags
> > +    bool            exists(const string& path); // works for both attributes and tags
> > +
> > +    string          getCurrentElementName();
> > +    bool            resetCurrentElement();
> > +
> > +    bool            setCurrentElementToChild(int index);
> > +    bool            setCurrentElement(const string& path);
> > +    bool            setCurrentElementToParent();
> > +    bool            setCurrentElementToParent(int numLevelsUp);
> > +    bool            setCurrentElementToSibling();
> > +    bool            setCurrentElementToPrevSibling();
>
> saw the ofSite PR, thanks :)
>
> removing "Element" might be enough. let's see if anyone else has a feeling
> for what makes the most sense.
>
> bool setElementToChild(int index);
> bool setElement(const string& path);
> bool setElementToParent();
> bool setElementToParent(int numLevelsUp);
> bool setElementToSibling();
> bool setElementToPrevSibling();
>
> bool moveToChild(int index);
> bool moveTo(const string& path);
> bool moveToParent();
> bool moveToParent(int numLevelsUp);
> bool moveToSibling();
> bool moveToPrevSibling();
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/openframeworks/openFrameworks/pull/2084/files#r4636930>
> .
>



-- 
joshua noble
http://thefactoryfactory.com