|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
My site is allowing the user to view data from an XML file(s), and I want to prevent the XML from being sent to the client.
I have been using PHP to convert the XML into HTML, but this is no fun. I hear Java is much nicer to work with for XML conversion. Has anyone worked with Java to convert XML to HTML? If yes, is it better the PHP? Will Java send the XML to the client like XSL or will it pars it out and send the results like PHP? Would I use the DOM with Java? I am not a Java person (that is probably apparent), but I am willing to learn if it is the best way to go. Thank you. |
|
#2
|
||||
|
||||
|
Hi, you should try with Cocoon, you can find tutorials at www.phpbuilder.com or www.ibm.com/developerworks or look for a Redbook in IBM's library!
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#3
|
|||
|
|||
|
The answer to your question (in my opinion) is a definite yes. Java is better at handling XML right now. I have worked with both PHP and Java and they are both great in their own way. PHP is definitely easier to use (in general), but Java is more powerful. It is a programming language vs. PHP being a scripting language. With that, there have been a lot of devlopments in the Java zone which have brought about many parsers and applications in general that can do many things with XML. Since Java is a programming language, it also enables you to expand on what you can do with XML and extend it to outside of the browser. Also, there are many classes that are available for parsing and transforming your XML into HTML (and other formats).
So that is my long-winded yes (again, in my opinion). If you want to learn more about Java & XML used together, check out O'Reilly's Java & XML book. Here is the URL: http://www.oreilly.com/catalog/javaxml2/ The web site gives you a sampling of the book here: http://www.oreilly.com/catalog/java...apter/ch09.html It gives you a good introduction to using XML with Java, but it does assume that you know some Java. If you don't already, they have another book which helped me get up and running. It's called Learning Java. The URL for that one is: http://www.oreilly.com/catalog/learnjava/
__________________
Edgar Castanedo |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > XML with DOM? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|