I have a java application that reads csv file and displays the data on a text area. the idea is to transform this data(source data) into a target data, this involves rearranging it and transforming some elements in each field. now i intend to transform this displayed csv data into an XML block and write an XSLT transformation rules to transform it. the first task is to convert this csv data into XML block. Anyone care to point me to the right direction? do i need to add a couple of classes to my application for this reason?
abbelylee
0
Newbie Poster
Recommended Answers
Jump to PostUnfortunately I am little help on the Java aspect, I will point you to these sites though:
- http://www.roseindia.net/xml/dom/CreatXMLFile.shtml
- http://t.genedavis.com/library/xml/java_dom_xml_creation.jspThey should help with the XML generation part. I …
Jump to Post<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output indent="yes" method="xml"/> <xsl:strip-space elements ="*"/> <xsl:template match="/"> <Address> <xsl:apply-templates/> </Address> </xsl:template> <xsl:template match="row"> <xsl:element name="Rowinfo"> <xsl:element name="Locator"> <xsl:value-of select="RateNumber"/> </xsl:element> <xsl:element name="LocatorDesignator"> <xsl:value-of select ="concat(RateLetter, concat(', ',RateAccomDesc))"/> </xsl:element> <xsl:element name="thoroughfare"> <xsl:value-of select="AssessmentStreet"/> …
All 6 Replies
Mike Askew
131
Veteran Poster
Featured Poster
abbelylee
0
Newbie Poster
Mike Askew
131
Veteran Poster
Featured Poster
abbelylee
0
Newbie Poster
Mike Askew
131
Veteran Poster
Featured Poster
abbelylee
commented:
Perfectly Solved
+0
abbelylee
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.