| 615 | } |
| 616 | |
| 617 | void XMLFeature::SetTagValue(string_view key, string_view value) |
| 618 | { |
| 619 | strings::Trim(value); |
| 620 | auto tag = FindTag(m_document, key); |
| 621 | if (!tag) |
| 622 | { |
| 623 | tag = GetRootNode().append_child("tag"); |
| 624 | tag.append_attribute("k").set_value(key.data(), key.size()); |
| 625 | tag.append_attribute("v").set_value(value.data(), value.size()); |
| 626 | } |
| 627 | else |
| 628 | { |
| 629 | tag.attribute("v").set_value(value.data(), value.size()); |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | void XMLFeature::RemoveTag(string_view key) |
| 634 | { |