Format XML data with JavaScript in one file

alifiresoft

New Member
I want to convert a single XML file into a human-readable format by JavaScript. Here is why:[*]Need to generate a human readable-document that is going to work everywhere. (Windows, Mac, Linux, iPhone, Android, Blackberry, etc.)[*]The information is coming out of a C++ data structure that I have defined.[*]Need to be able to include pictures.[*]This document would be sent as an email attachment once created.I have looked into:
  • XSLT: Can work as a single file, but only supported on the very newest mobile devices.
  • CSS: I don't think the formatting is sophisticated enough to get what I need.
  • PDF: Open source library would have to be included into environment. I would prefer not to do this if there is a good alternative.
So that is why I am looking at JavaScript. But the first question is, can JavaScript format/display XML data that exists in the same file? If so, how?
 
Back
Top