diff options
Diffstat (limited to 'parameter/Element.cpp')
-rwxr-xr-x | parameter/Element.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/parameter/Element.cpp b/parameter/Element.cpp index 2c8393d..4ccf149 100755 --- a/parameter/Element.cpp +++ b/parameter/Element.cpp @@ -292,8 +292,8 @@ bool CElement::fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& se return true; } -// From IXmlSource -void CElement::toXml(CXmlElement& xmlElement, CXmlSerializingContext& serializingContext) const +void CElement::childrenToXml(CXmlElement& xmlElement, + CXmlSerializingContext& serializingContext) const { // Browse children and propagate uint32_t uiNbChildren = getNbChildren(); @@ -308,15 +308,17 @@ void CElement::toXml(CXmlElement& xmlElement, CXmlSerializingContext& serializin xmlElement.createChild(xmlChildElement, pChild->getKind()); - // Set attributes - pChild->setXmlNameAttribute(xmlChildElement); - - // Propagate pChild->toXml(xmlChildElement, serializingContext); } } +void CElement::toXml(CXmlElement& xmlElement, CXmlSerializingContext& serializingContext) const +{ + setXmlNameAttribute(xmlElement); + childrenToXml(xmlElement, serializingContext); +} + void CElement::setXmlNameAttribute(CXmlElement& xmlElement) const { // By default, set Name attribute if any |