LMMS
Loading...
Searching...
No Matches
juce_XmlElement.h File Reference

Go to the source code of this file.

Classes

class  juce::XmlElement
struct  juce::XmlElement::TextFormat
struct  juce::XmlElement::GetNextElement
struct  juce::XmlElement::GetNextElementWithTagName
class  juce::XmlElement::Iterator< Traits >
struct  juce::XmlElement::XmlAttributeNode

Namespaces

namespace  juce

Macros

#define forEachXmlChildElement(parentXmlElement, childElementVariableName)
#define forEachXmlChildElementWithTagName(parentXmlElement, childElementVariableName, requiredTagName)

Macro Definition Documentation

◆ forEachXmlChildElement

#define forEachXmlChildElement ( parentXmlElement,
childElementVariableName )
Value:
for (auto* (childElementVariableName) : ((parentXmlElement).macroBasedForLoop(), (parentXmlElement).getChildIterator()))

DEPRECATED: A handy macro to make it easy to iterate all the child elements in an XmlElement.

New code should avoid this macro, and instead use getChildIterator directly.

The parentXmlElement should be a reference to the parent XML, and the childElementVariableName will be the name of a pointer to each child element.

E.g.

XmlElement* myParentXml = createSomeKindOfXmlDocument();
forEachXmlChildElement (*myParentXml, child)
{
if (child->hasTagName ("FOO"))
doSomethingWithXmlElement (child);
}
Definition XmlElement.h:145
#define forEachXmlChildElement(parentXmlElement, childElementVariableName)
Definition juce_XmlElement.h:824
See also
forEachXmlChildElementWithTagName

◆ forEachXmlChildElementWithTagName

#define forEachXmlChildElementWithTagName ( parentXmlElement,
childElementVariableName,
requiredTagName )
Value:
for (auto* (childElementVariableName) : ((parentXmlElement).macroBasedForLoop(), (parentXmlElement).getChildWithTagNameIterator ((requiredTagName))))

DEPRECATED: A macro that makes it easy to iterate all the child elements of an XmlElement which have a specified tag.

New code should avoid this macro, and instead use getChildWithTagNameIterator directly.

This does the same job as the forEachXmlChildElement macro, but only for those elements that have a particular tag name.

The parentXmlElement should be a reference to the parent XML, and the childElementVariableName will be the name of a pointer to each child element. The requiredTagName is the tag name to match.

E.g.

XmlElement* myParentXml = createSomeKindOfXmlDocument();
forEachXmlChildElementWithTagName (*myParentXml, child, "MYTAG")
{
// the child object is now guaranteed to be a <MYTAG> element..
doSomethingWithMYTAGElement (child);
}
#define forEachXmlChildElementWithTagName(parentXmlElement, childElementVariableName, requiredTagName)
Definition juce_XmlElement.h:852
See also
forEachXmlChildElement