Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a xml file(template) and a csv file what next?

Status
Not open for further replies.
Sep 14, 2005
1
US
As you will notice this is the FIRST time I've worked with xml. I've done some research but have not found the answer to my question. Please help with my issues..thanks in advance.

I have and xml file that looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<!-- CDR descriptions v0.1 -->
<CDR>
<field no="1" name="start-time" fmt="string"/>
<field no="2" name="start-time" fmt="uint32"/>
<field no="3" name="call-duration" fmt="HH:MM:SS"/>
<field no="4" name="call-source" fmt="A.B.C.D"/>
<field no="5" name="call-source-q931sig-port" fmt="uint32"/>
<field no="6" name="call-dest" fmt="A.B.C.D"/>
<field no="7"/>

then I have my .csv file

How do I get the data from the csv file into this format/template (the csv file is HUGE) where it looks cool and I get a big old raise?

Thanks
 
Repeated applications of XSLT's substring_before and substring_after functions will accomplish this, provided none of the data contains commas.
 
Or you could import it into Excel (which you might already have) and save it as XML. Then you wouldn't get that fat raised dinged by the cost of the software.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top