• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

com.sun.xml.tree package

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, folks:
I want to create a XML output document from my JSP page and I am thinking about using com.sun.xml.tree.ElementNode and com.sun.xml.tree.XmlDocument classes. (methods in those are createElement, setAttribute, etc). I think J2EE contains these API. However, when I tried to compile, I was given an error like these classes/methods cannot be found.
Anyone has any idea? what is the best way to create a XML from JSP page?
thanks in advance
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will get a lot better results if you do all of your manipulations with the standard dom interfaces instead of trying to use specific classes. Instead of:
com.sun.xml.tree.ElementNode
use
org.w3c.dom.Element
Getting away from specific implementations is the whole idea behind the JAXP package.
Bill

------------------
author of:
 
reply
    Bookmark Topic Watch Topic
  • New Topic