Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Compile/process XML ?

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I create XML file, do I need special compiler or processor or like HTML I can view results directly in browser window ???
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vishakha,
You really need to use a parser; there's a number of the out there ... XT, XML4J, Saxon, Xalan, etc. XT is very easy to use, you can d/l it from http://www.jclark.com/xml/xt.html.
If you open an XML in IE5 it will display as the original code, nicely formated, but won't always do a translation to HTML, even if you reference the XSL stylesheet.
NN 6 will display the element contents ...
Hope that helps.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It all depends really what you mean by "results". XML is just a data format. It's not executable in any way so it can't be expected to have "results". If you want to view your XML file, thena text editor will do nicely. If you want to view it in some other form, then you can either transform it 'manually' by writing some software which reads the data in using an XML parser, alters it and shows the result, or you can transform it by passing your XML file and an XSLT stylesheet to and XSL engine such as XT or Xalan.
What sort of "results" are you looking for?
 
Vishakha Ahuja
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An example of results would be:
If you have a <bold> tag in HTML then the browser window displays bold text. Similarly, i want to view such results for XML files on the browser. This is what I meant by "results".
Thanks
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In which case you need to transform your XML into something the browser understands, typically HTML. Imagine I have an XML file:

This bears no relation to HTML except that it uses the same style of tags. In order to show it meaningfully in a browser you need to decide how you want to represent the information in it, as HTML. You can do this either by transforming the XML using XSLT or CSS stylesheets, or by writing a program to read the data in using an XML parser, decide what should be produced, and output some HTML.
What information does your XML file contain? And how would you like it to appear in the browser?
 
Hug your destiny! And hug this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic