mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added an overload to ValueTree::fromXml() which can take an XML string and parse it
This commit is contained in:
parent
0fb8c8e82a
commit
49fa0f73e4
2 changed files with 14 additions and 0 deletions
|
|
@ -1015,6 +1015,14 @@ ValueTree ValueTree::fromXml (const XmlElement& xml)
|
|||
return {};
|
||||
}
|
||||
|
||||
ValueTree ValueTree::fromXml (const String& xmlText)
|
||||
{
|
||||
if (auto xml = parseXML (xmlText))
|
||||
return fromXml (*xml);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
String ValueTree::toXmlString (const XmlElement::TextFormat& format) const
|
||||
{
|
||||
if (auto xml = createXml())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue