File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes How to Represent dynamic Image data into XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to Represent dynamic Image data into XML " Watch "How to Represent dynamic Image data into XML " New topic
Author

How to Represent dynamic Image data into XML

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I have some Employee Data in my MySQL Database.
I am representing all this data in form of XML as shown

<Employees>

<User>
<name>Kiran</name>
<Dept>20</Dept>
</User>

<User>
<name>Ravi</name>
<Dept>30</Dept>
</User>

</Employees>



I am using XstreamAPI to convert ArrayList of Employee Data into XML . All this works fine .


Now my question is that ,Image of an Employee has also been added .

Please let me know as how can bring this Image also into this XML Format .
Please share your inputs and views on this .

Thanks .

Save India From Corruption - Anna Hazare.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You can base64 encode it.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks at least you gave some input to perform Google search on this .
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

I don't recommend putting binary data inside XML, its not particularly good at it.


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Represent dynamic Image data into XML
 
Similar Threads
Parse an XML document and put those values in a HashMap
Populating second list based on selection of first list
Writing linked list to an XML file.
Cannot understand MySqlQuery Working.
Change the value of a child element.