Re: [Servingxml-help] Using TAB as delimiter in flat file
Brought to you by:
danielaparker
From: Daniel P. <dan...@sy...> - 2006-10-22 22:35:49
|
Hello Harry, I tested an example with horizontal tab delimiter (x09), using the = resources script below, with ServingXML version 0.5.5 <sx:resources xmlns:sx=3D"http://www.servingxml.com/core"> <sx:service id=3D"employees"> <sx:serialize> <sx:transform> <sx:content ref=3D"employee-data"/> </sx:transform> </sx:serialize> </sx:service> <sx:recordContent id=3D"employee-data" name=3D"employees"> <sx:flatFileReader> <sx:urlSource url=3D"data/tab_delimited_data.txt"/> <sx:flatFile ref=3D"employee-file"/> </sx:flatFileReader> </sx:recordContent> <sx:flatFile id=3D"employee-file"> <sx:flatFileBody> <sx:flatRecordType name=3D"employee"> <sx:fieldDelimiter value=3D"\t"/> <sx:delimitedField name=3D"social-security-number"/> <sx:delimitedField name=3D"employee-name"/> <sx:delimitedField name=3D"salary"/> </sx:flatRecordType> </sx:flatFileBody> </sx:flatFile> </sx:resources> It worked as expected, so I can't help without more information. If you = can prepare a short failing example, and send it to me as a zipped = attachment to the inquiries email on the home page, I'll investigate = further. Regards, Daniel Parker ----- Original Message -----=20 From: Harry Honing; home=20 To: Daniel Parker=20 Cc: ser...@li...=20 Sent: Friday, October 20, 2006 3:02 AM Subject: Re: [Servingxml-help] Using TAB as delimiter in flat file Hello Daniel, Thnak you for responding.=20 I tried it out but this did not work out. I know the tab is in the flat file X'09'. Do you know if there is a = possibility to set hex-values for the delimiter. Or using the ascii escape value in some way.=20 Is there in the books a place where to find these kind of codes (like = your suggestion for \t)=20 Kind regards, Harry Daniel Parker schreef:=20 Hello Harry, Try using=20 <sx:fieldDelimiter value=3D"\t"/> inside your sx:flatRecordType declaration. Best regards, Daniel ----- Original Message -----=20 From: Harry Honing; home=20 To: ser...@li...=20 Sent: Thursday, October 19, 2006 10:18 AM Subject: [Servingxml-help] Using TAB as delimiter in flat file Hi, I'm new to servingxml and i hope that somebody knows a solution. My flat file has a <TAB> as field delimiter (hex'09'). I cannot = find how to tell servingxml that it should use that value for dilimiter. My goal is to go fromflat-delimited to xml Kind Regards, Harry -------------------------------------------------------------------------= - = -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your = job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642=20 -------------------------------------------------------------------------= - _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job = easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |