• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Images with XML

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im using xml as tool that humans can use to write documents which are understandable by both computers and humans...for example rather having to write a question paper in formal way, write it using markup language so that it can be deployed easily and understandable by all. But problem occurs when there is need of attaching images e.g. diagrams etc with questions..how can i do that using schema..what are alternatives...thanks
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The simple way would be refering the image location as an attribute or element.
example: <question num="10" imageURL="/images/foo.gif" query="some text" />

or by using binary representation(xsd:base64Binary) of image data and post processing it to display the image back. Not a good idea, sucks time and resource. IMHO
 
Adnan Memon
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is well...I had user to submit both an .xml file and associated images. Now if we think of web UI to such user it probably would have one browse textbox for xml file but what about images thier number could be any...How to cope with that
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Adnan Memon:
That is well...I had user to submit both an .xml file and associated images. Now if we think of web UI to such user it probably would have one browse textbox for xml file but what about images thier number could be any...How to cope with that


I might have not understand your requirements(SRS) completely, but posting XML and images seperately from the user is not a good idea. You want your user to upload an xml file, then you can use a file upload function, the images in the xml file will be encoded using base64binary. This involves both pre and post processing of images.

Someone please correct me if i'm wrong.
 
Adnan Memon
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me clear it to u...a user had written a test paper in xml markup with image url referring to images, there is some webapp running at xyz server...user is given a web UI to submit .xml file and related images using internet browser by HTTP Post request...what would be the interface to such hypothetical user...as far as the idea of including image binary content in xml file using base64encoding, i've never used it before...whether user had to copy binary contents direct into xml file or something different..would u pls provide an example
 
You're not going crazy. You're going sane in a crazy word. Find comfort in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic