Binary XML vs. WBXML

152 views
Skip to first unread message

Michael Bell

unread,
Jan 10, 2011, 11:52:24 AM1/10/11
to android-platform
Hi,

I maintain libwbxml and there is an open ticket which reports problems
with AndroidManifest.xml. The file looks and starts like a WBXML file.
So I have two questions:

1. What is binary XML in terms of Android?

2. If WBXML and binary XML of Android are the same stuff then where
can I find the token and attribute tables?

Best regards

Michael

Dianne Hackborn

unread,
Jan 10, 2011, 10:13:49 PM1/10/11
to android-...@googlegroups.com
It is not WBXML at all.  It is Android's custom resource format.


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.




--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

PhilL

unread,
Feb 13, 2011, 6:07:06 PM2/13/11
to android-platform


On Jan 10, 11:52 am, Michael Bell <michael.b...@cms.hu-berlin.de>
wrote:
> Hi,
>
> I maintain libwbxml and there is an open ticket which reports problems
> with AndroidManifest.xml. The file looks and starts like aWBXMLfile.
> So I have two questions:
>
> 1. What is binary XML in terms of Android?
>
> 2. IfWBXMLand binary XML of Android are the same stuff then where
> can I find the token and attribute tables?
>
> Best regards
>
> Michael

Android binary XML is quite simple to parse; the best place to look is
frameworks/base/include/utils/ResourceTypes.h in the platform source.

Tokens and attributes are all defined dynamically in string pool
tables; unlike WBXML there are no doctype / standard tokens.

Hope this helps,

Phil Lello

Sathish

unread,
Mar 3, 2011, 9:20:30 PM3/3/11
to android-platform
Hi,

Could you tell where can I find the XML serializer that generates the
binary xml in Andriod sources?

Regards
Sathish
> tables; unlikeWBXMLthere are no doctype / standard tokens.

Sathish

unread,
Mar 3, 2011, 8:19:23 PM3/3/11
to android-platform
Hi,

Could you tell where can I find the xml serializer that creates this
binary XML in andriod resources?

Regards
Sathish

On Feb 14, 4:07 am, PhilL <phil.le...@googlemail.com> wrote:
> tables; unlikeWBXMLthere are no doctype / standard tokens.

PhilL

unread,
Mar 5, 2011, 12:50:08 PM3/5/11
to android-platform
Hi Sathish,

The serialisation is part of aapt.

If you check out the sources using 'repo', (see the instructions at
the top of http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree),
the relevant code is in frameworks/base/tools/aapt. Alternatively, if
you just git clone platform/framesworks/base.git, then the source is
in tools/aapt.

The nearest I've seen to a file-format reference is the header file
(platform/frameworks)/include/utils/ResourceTypes.h.

Hope this helps,

Phil

Dianne Hackborn

unread,
Mar 5, 2011, 1:51:27 PM3/5/11
to android-...@googlegroups.com, PhilL
Yeah ResourceTypes.h is the only documentation on the format.

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

PhilL

unread,
Apr 14, 2011, 1:44:18 AM4/14/11
to android-platform
Are there currently any plans for either a Java API or a C library (vs
embedded in aapt) to write Android binary XML? It would be useful to
serve Android clients binary XML to speed up handset parsing.

I'm happy to start the work myself, but want to co-ordinate my efforts
- especially if I'm refactoring aapt to use a lib.

Does anyone have a strong view on pure-Java vs JNI for a Java API? My
instinct is JNI, as it would perform better on handsets, and allow
integration into J2EE websites.

Best wishes,

Phil Lello

Dianne Hackborn

unread,
Apr 14, 2011, 3:45:36 AM4/14/11
to android-...@googlegroups.com, PhilL
There are no plans, and I'm not sure it makes sense.  You could maybe make a subset work, but a lot of the optimizations it implements are based on knowing attribute types and such that are tied to a specific build of an app.

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Reply all
Reply to author
Forward
0 new messages