By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,849 Members | 2,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,849 IT Pros & Developers. It's quick & easy.

Convert XML file to a bitmap file

P: n/a
SJ
I'm currently using Visio to convert and XML file to a bitmap file, but it is
taking too long. Is there a better way of converting an xml to a bmp file?
I'm using DOM for modifying the XML file. Does DOM support conversion from
XML to bmp?
Thanks
Dec 9 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
SJ wrote:
I'm currently using Visio to convert and XML file to a bitmap file,
but it is
taking too long. Is there a better way of converting an xml to a bmp
file?
I'm using DOM for modifying the XML file. Does DOM support conversion
from XML to bmp?


DOM is just a specification for how a parser expresses the structure
and content of an XML document in-memory to an application. It has
nothing to do with what your application does with the information.

XML is a text-based format. When you say "convert to BMP" do you
mean "typeset and render the page image as BMP"? Or do you mean that
your XML is being used to store some kind of diagrammatic data which
you want drawn and output as BMP? (implied by your use of Visio).

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Dec 9 '05 #2

P: n/a
CJ
xml supports binary data. it's encoded within the document and you
will need to take the node that holds the encoded data, push it to a
byte stream and use the gdi classes in .net to render a bitmap from the
bytestream. this should be much faster than running it through visio.

Dec 11 '05 #3

P: n/a
Hello!
XML is a text-based format. When you say "convert to BMP" do you
mean "typeset and render the page image as BMP"? Or do you mean that
your XML is being used to store some kind of diagrammatic data which
you want drawn and output as BMP? (implied by your use of Visio).


For the latter case a solution could be the use of XSLT to create SVG
from the original data. Then Apache Batik can be used to create a bitmap
from SVG.
--
Pascal Schmitt
Dec 11 '05 #4

P: n/a
CJ wrote:
xml supports binary data. it's encoded within the document and you
will need to take the node that holds the encoded data, push it to a
byte stream and use the gdi classes in .net to render a bitmap from
the bytestream. this should be much faster than running it through
visio.


Quite, but XML itself does not support binary data at all. It's a text
format. Of course you can encode binary data to a text string and then
embed it in XML, but that is not the same thing as "supporting" binary
because the XML markup does not know what it is. Accuracy, please.

///Peter

Dec 11 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.