File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes String to XML - converting space-delimited tabular text into XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "String to XML - converting space-delimited tabular text into XML" Watch "String to XML - converting space-delimited tabular text into XML" New topic
Author

String to XML - converting space-delimited tabular text into XML

RNivas
Greenhorn

Joined: Aug 20, 2003
Posts: 8
Hi all,

I am trying to develop a Java Component which will read a text file and will provide output as XML object/file.

Text string from file will contain space-delimited tabular text e.g.


COUNTRY/CO : PRODUCT: WINNERS: PRICE: DATES
--------------------------------------------------------------
CPC/TW: 950 KB Zafiro: ExxonMobil: NA 21-22 Nov
950 KB Zafiro: ExxonMobil: NA 25-26 Nov
PETECHIM/VN: Bunga Kekwa: below Tapis APPI -$/bl Nov
CPC/TW: Qatar Marine: major: premium to QP Nov
: Qatar Marine: NA: premium to QP Nov
===============================================================
== b = buys s = sells Check results on[CRU/AT1]
================================================================

//OR

Cash Spot Cash Tom Tom Next
------------------------------------------------------------
TIME Bid/Ask Bid/Ask Bid/Ask
(in IST)
1000 0.65/0.70 0.12/0.15 0.20/0.25
1.07% 0.99% 0.41%
(Closing Oct 5)
1000 0.20/0.25 0.10/0.15 0.10/0.15
0.82% 0.82% 0.82%
-----------------------------------------------------------





All I need is to capture this text in form of XML and then can present as HTML table.

Any idea.....?

Thanks & Regards
[ October 20, 2005: Message edited by: RNivas ]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

What have you tried? What is the problem?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Hi,

See for example a CVS to XML example is similar to TAB.

Java -XML by Orelly
 
Don't get me started about those stupid light bulbs.
 
subject: String to XML - converting space-delimited tabular text into XML