diff options
| author | 2015-11-30 19:51:53 +0000 | |
|---|---|---|
| committer | 2015-11-30 19:51:53 +0000 | |
| commit | be107f46cf4ed7437e773fb79a2ef5c5edaa49de (patch) | |
| tree | c49fa325a060d10a773a00ae36b972ae8ebf49a0 /tools/aapt/XMLNode.cpp | |
| parent | 2a0dd0e1e302a9e12769d854f5617111a0135f22 (diff) | |
| parent | 9d0f7d44d5cc5322415f52f7ce03cc37a478b350 (diff) | |
Merge "Implement AAPT Bundle format"
Diffstat (limited to 'tools/aapt/XMLNode.cpp')
| -rw-r--r-- | tools/aapt/XMLNode.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp index dc08eb806356..5b215daeb494 100644 --- a/tools/aapt/XMLNode.cpp +++ b/tools/aapt/XMLNode.cpp @@ -693,6 +693,12 @@ const Vector<sp<XMLNode> >& XMLNode::getChildren() const return mChildren; } + +Vector<sp<XMLNode> >& XMLNode::getChildren() +{ + return mChildren; +} + const String8& XMLNode::getFilename() const { return mFilename; @@ -717,6 +723,18 @@ const XMLNode::attribute_entry* XMLNode::getAttribute(const String16& ns, return NULL; } +bool XMLNode::removeAttribute(const String16& ns, const String16& name) +{ + for (size_t i = 0; i < mAttributes.size(); i++) { + const attribute_entry& ae(mAttributes.itemAt(i)); + if (ae.ns == ns && ae.name == name) { + removeAttribute(i); + return true; + } + } + return false; +} + XMLNode::attribute_entry* XMLNode::editAttribute(const String16& ns, const String16& name) { |