I personally don't like pushTag, popTag. They don't fit with the way that
anyone else talks about DOM or XML and I found them confusing.

>is it possible to create an addAttribute() too?

Sure. It would just call setAttribute(). Attributes can't be null, whereas
values can, hence the addValue() but no addAttribute(), but whatever's easy.


On Mon, Jun 10, 2013 at 9:18 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();
>
> what do you think is the best naming for these? setCurrentElementTo* or
> maybe more oldschool like previousTag nextTag pushTag and popTag?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/openframeworks/openFrameworks/pull/2084/files#r4615325>
> .
>



-- 
joshua noble
http://thefactoryfactory.com