1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-23 01:44:22 +00:00

Added a setTagName method to XmlElement

This commit is contained in:
hogliux 2018-04-04 10:46:18 +01:00
parent 36ff414d4e
commit 736a07e4ce
2 changed files with 11 additions and 0 deletions

View file

@ -439,6 +439,12 @@ XmlElement* XmlElement::getNextElementWithTagName (StringRef requiredTagName) co
return e;
}
void XmlElement::setTagName (StringRef newTagName)
{
jassert (isValidXmlName (newTagName));
tagName = StringPool::getGlobalPool().getPooledString (newTagName);
}
//==============================================================================
int XmlElement::getNumAttributes() const noexcept
{

View file

@ -278,6 +278,11 @@ public:
*/
bool hasTagNameIgnoringNamespace (StringRef possibleTagName) const;
/** Changes this elements tag name.
@see getTagName
*/
void setTagName (StringRef newTagName);
//==============================================================================
/** Returns the number of XML attributes this element contains.