XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + macros for custom validation e... (6)
-> + Does Stylus Studio generate XM... (4)
-> + another csv conversion (7)
-> + ADD CVS to Source Control drop... (2)
-> + Automate xquery (6)
-> + Correcting multiple XML docume... (2)
-> + Unable to locate Components\Da... (5)
-> + Runtime Error, Struzzo.exe, Ab... (11)
-> + Convert XML to EDIfact (3)
-> + I don't have the Mapper tab (6)
-> - CSV conversion with null field (3)
-> ->CSV conversion with null ...
-> ->CSV conversion with null ...
-> + Converting a Complex Flat File... (2)
-> - installion in batch mode (1)
-> + Complete Custom Validation Lis... (2)
-> + creating xml from csv flat fil... (9)
-> - need Help Regarding XBRL (1)
-> + Exception FODC0004: file or di... (2)
-> + Activation (2)
-> + java runtime error (2)
-> + connection problem with AS 400... (4)
-- Previous [781-800] [801-820] [821-840] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Mitchell SprinskySubject: CSV conversion with null field
Author: Mitchell Sprinsky
Date: 08 Jun 2009 09:32 AM
I am trying to convert a CSV file with multiple columns. Most of the time, the second address field is blank. When the file is converted, address2 comes out as <address2/>. How do I get the system to convert it as it does all the other fields? So, if address2 is blank, the xml file would still have <address2></address2>.


Example:

Currently:

<table>
<row>
<DEA>555555555</DEA>
<First_Name>JOHN</First_Name>
<Last_Name>SMITH</Last_Name>
<HMS_POID>XXXXXXXX</HMS_POID>
<Acct_Name>BIG HOSPITAL</Acct_Name>
<Acct_Address1>4444 HOSPITAL WAY</Acct_Address1>
<Acct_Address2/>
<Acct_City>FORT LAUDERDALE</Acct_City>
<Acct_State>FL</Acct_State>
<Acct_Zip>33308</Acct_Zip>
<Phys_Acct_Rank>1</Phys_Acct_Rank>
<Workload>>50%</Workload>
<Workload_Rank>1</Workload_Rank>
</row>
</table>

Should be:

<table>
<row>
<DEA>555555555</DEA>
<First_Name>JOHN</First_Name>
<Last_Name>SMITH</Last_Name>
<HMS_POID>XXXXXXXX</HMS_POID>
<Acct_Name>BIG HOSPITAL</Acct_Name>
<Acct_Address1>4444 HOSPITAL WAY</Acct_Address1>
<Acct_Address2></Acct_Address2>
<Acct_City>FORT LAUDERDALE</Acct_City>
<Acct_State>FL</Acct_State>
<Acct_Zip>33308</Acct_Zip>
<Phys_Acct_Rank>1</Phys_Acct_Rank>
<Workload>>50%</Workload>
<Workload_Rank>1</Workload_Rank>
</row>

Postnext
Ivan PedruzziSubject: CSV conversion with null field
Author: Ivan Pedruzzi
Date: 08 Jun 2009 10:28 AM
Hi Mitchell,

For an XML parser there is no difference between

<Acct_Address2/> and <Acct_Address2></Acct_Address2>

Can you tell us why this is creating problem for you?

Thanks
Ivan Pedruzzi
Stylus Studio Team

Posttop
Mitchell SprinskySubject: CSV conversion with null field
Author: Mitchell Sprinsky
Date: 08 Jun 2009 10:31 AM
>Hi Mitchell,
>
>For an XML parser there is no
>difference between
>
><Acct_Address2/> and
><Acct_Address2></Acct
>_Address2>
>
>Can you tell us why this is
>creating problem for you?
>
>Thanks
>Ivan Pedruzzi
>Stylus Studio Team

Thanks for the fast reply. The problem is with my Vendor who is trying to import our data into the new CRM system. She is insisting that it be tagged with an open and close. I think she understands XML about as much as I do -- not much.

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.