X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/dadd9c1fc18bd05c84a357b56e945b5829b3bd95..68cf67c743fe0d9e39465ca27f0a91415494b848:/XMLNode.h diff --git a/XMLNode.h b/XMLNode.h index 8c4243c..05624b7 100644 --- a/XMLNode.h +++ b/XMLNode.h @@ -17,7 +17,7 @@ extern const char* const RESOURCES_ANDROID_NAMESPACE; bool isWhitespace(const char16_t* str); -String16 getNamespaceResourcePackage(String16 namespaceUri); +String16 getNamespaceResourcePackage(String16 namespaceUri, bool* outIsPublic = NULL); status_t parseStyledString(Bundle* bundle, const char* fileName, @@ -25,6 +25,7 @@ status_t parseStyledString(Bundle* bundle, const String16& endTag, String16* outString, Vector* outSpans, + bool isFormatted, bool isPseudolocalizable); void printXMLBlock(ResXMLTree* block); @@ -68,6 +69,8 @@ public: const String16& getElementName() const; const Vector >& getChildren() const; + const String8& getFilename() const; + struct attribute_entry { attribute_entry() : index(~(uint32_t)0), nameResId(0) { @@ -91,6 +94,10 @@ public: const Vector& getAttributes() const; + const attribute_entry* getAttribute(const String16& ns, const String16& name) const; + + attribute_entry* editAttribute(const String16& ns, const String16& name); + const String16& getCData() const; const String16& getComment() const; @@ -98,8 +105,14 @@ public: int32_t getStartLineNumber() const; int32_t getEndLineNumber() const; + sp searchElement(const String16& tagNamespace, const String16& tagName); + + sp getChildElement(const String16& tagNamespace, const String16& tagName); + status_t addChild(const sp& child); + status_t insertChildAt(const sp& child, size_t index); + status_t addAttribute(const String16& ns, const String16& name, const String16& value); @@ -114,6 +127,8 @@ public: void removeWhitespace(bool stripAll=true, const char** cDataTags=NULL); + void setUTF8(bool val) { mUTF8 = val; } + status_t parseValues(const sp& assets, ResourceTable* table); status_t assignResourceIds(const sp& assets, @@ -179,6 +194,9 @@ private: String8 mFilename; int32_t mStartLineNumber; int32_t mEndLineNumber; + + // Encode compiled XML with UTF-8 StringPools? + bool mUTF8; }; #endif