I have an XML doucment in which there is an tag for image like this
if there is an image then the tag would be as follows
<thumbnail>
<type>IMAGE JPG</type>
<data> base64 data </data>
</thumbnail>
And if there is no image then
<thumbnail/>
I want to get the base64 encoded image using DOM parser
and how to handle tags which don’t have any image like <thumbnail/>
In the XML document there will be any number of tags.
The COS package has a Base64Decoder. Apache Commons Codec offers an alternative. Also one may use
sun.misc.BASE64Decoder, but that makes one’s code Sun JDK-specific.