[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Automatic html generation of xml file "advice needed"
Hi all.im in need of some advice. What i want to do, is, make a html
representation of any xml file.I already have some xslt code to get me
started. What i will do is take any arbitrary xml file and generate some
standard html representation of it.The representation will comprise of
components (element names, text data, attributes and their values).This
shouldnt be too much of a problem. The tricky part is establishing a
standard format i could apply. For example, should i display the xml file as
one large table, or should i display each element name with <u> tags and
display its text below it??
The attributes will be no problem, im thinking of the following, ----------------------------------------------------------- <b>attributeName</b>: attributeValue ---------------------------------------------------------- and for any element that has a text node as a child, i will do something like, -------------------------------------- <u>elementName</u> textNodeValue. -------------------------------------- But im thinking that there will be instances where elements will not have text nodes as immediate children, but as descendants, for example, <book> <author> <first_name>Joe</first_name> <last_name>Bloggs</last_name> </author> </book> Im just thinking of the best way to represent elements!Should i only print element names that have a text node?if i do this than i would loose some element names, i.e the elements that dont have text nodes, such as author above.Can provide me with a little help for this problem?what do you reckon is my best way to tackle this?? Many thanks for your help, Best wishes, -Kilo Juliet- _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|