hai all, how to convert javastring into XML format and convert XML to java string ??? (this should be dynamic during run time ). if there is any solution help me ....
ex: i'm having string array which was readed from a file . then i want to convert it into XML format to C++ structure ... from C++ structure i will get the Reply as XML format .. then i want to convert it into java string format... send me Some sample Code if any......
[ EJFH: Remove invitation to take discussion offline ] [ February 07, 2005: Message edited by: Ernest Friedman-Hill ]
Ernest Friedman-Hill
author and iconoclast
Marshal
Please don't ask people to email you answers to your questions. If the answers are posted here, then other people can benefit from them, as well.
Your question is very vague, and the answers depend on exactly what the various formats you're talking about would look like. Perhaps you could explain in a bit more detail, showing brief, accurate examples of the data you want to convert, and what you want to convert it to.
hai Ernest Friedman-Hill , i'm reading text file and store the text file in a string variable . then i want to convert the string into a xml format .
this is my clear question.. if u need more details other than this tell me
by dhana
K Riaz
Ranch Hand
Joined: Jan 08, 2005
Posts: 375
posted
0
If I understand the question correctly, you wish to convert raw text into a valid XML document. If this is the case, it should be trival with the amount of free XML Parsers available. I would suggest using JDOM for this. You can easily set the text for whichever XML element you want. Get all the data into variables and then build an XML document, add elements and attributes as appropiate and output to file.
dhana sss
Greenhorn
Joined: Dec 04, 2004
Posts: 16
posted
0
Thanks Kashif Riaz and all ,
for giving me idea to use JDOM .... another one question friends ..... i want to convert the XML file to String or RTF or Text file . if there is any solution tell ... and any sample code if any ..
thanks by dhana
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12269
1
posted
0
The subject of converting XML formatted data to text, RTF, PDF or HTML gets huge thick books - some of which are littering my desk right now.... You should ask for suggestions in the XML and Related Tech forum. Bill [ February 08, 2005: Message edited by: William Brogden ]