Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

XML using XSLT

Thread view: 
vsingr@gmail.com - 25 Nov 2005 15:55 GMT
Friends,
I have a problem here with me hopefully some of you geeks can point me
in the right direction. My requirement is that I have an existing set
of data which needs to pass through some kind of processor and spit out
a XML file. No wthe template for the XML is standard just that it may
have repeating segments. The question here is I vote for some kind
parser like JAXP to create the XML.. My coworker wants me to use XSLT
to generate the same. is that a possibility? If so how can I achieve
it? Also which will be the ideal solution?
Any help in this regard would be greatly appreciated.

Thanks in advance,
Sriram
John C. Bollinger - 25 Nov 2005 18:12 GMT
> Friends,
> I have a problem here with me hopefully some of you geeks can point me
> in the right direction.

I suspect that you mean no offense, but the term "geek" is not
universally received as complimentary or even neutral.  For myself, even
though I might occasionally refer to myself as a geek, or freely accept
the term from people I know, I find it mildly offensive coming from a
total stranger.  Maybe I'm odd that way.

>                          My requirement is that I have an existing set
> of data which needs to pass through some kind of processor and spit out
> a XML file. No wthe template for the XML is standard just that it may
> have repeating segments. The question here is I vote for some kind
> parser like JAXP to create the XML.. My coworker wants me to use XSLT
> to generate the same. is that a possibility?

Only if the existing data is XML.  XSLT takes XML as input, though its
output is not necessarily XML.  Perhaps your coworker had that backward?
 Similarly, a JAXP parser is for handling input that is already XML,
not for creating XML from non-XML.  You said nothing about the input
data being XML, and since creating an XML version seems to be the object
of the exercise I am assuming that the input is /not/ XML.

>                                                If so how can I achieve
> it? Also which will be the ideal solution?
> Any help in this regard would be greatly appreciated.

The two main techniques I know for what you want to do are (1) to
construct a DOM tree out of the data followed by writing the result
(perhaps via a default Transformer), or (2) to just write the data using
standard stream I/O.  You could probably write or even find a templating
solution, but it would not be XSLT.

Signature

John Bollinger
jobollin@indiana.edu

Roedy Green - 25 Nov 2005 19:42 GMT
>you geeks

A geek is someone who bites the heads off live chickens in a circus
sideshow.  I take from the respectful tone of the rest of your post,
that is not the meaning you intended.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

vsingr - 28 Nov 2005 14:34 GMT
Well I apologize for using the tem geek. I have been seeing people
using that quite often at my work place. may be I should learn to see
the meaning before i yuse them. Pardon my ignorance. and thanks for
your responses for the actual problem itself.
Roedy Green - 28 Nov 2005 17:43 GMT
>Well I apologize for using the tem geek.

It is a bit like the term "nigger".  You see black people using it to
each other, but if you use it, be prepared for fireworks.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.