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
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Edward  FagbemiSubject: CONVERT SQL Server data to XML.
Author: Edward Fagbemi
Date: 25 Jan 2012 06:35 PM
Originally Posted: 25 Jan 2012 06:34 PM
I am using STYLUS 14 XML STUDIO and I am tasked with creating an xml file from a SQL Server table.

I also have to enclose the table in two xml tags.For simplicity I have add two fields to illustrate the example. The stylus studio created a parent tag which I changed to Biliing by doing a find and replace. But need to add the <1098> tag as a parent of the billing tab.so that each record has <1098><billing>xml tags made upmof data from the table </billing></1098>
<1098>
<Billing>
<studentname>Aaron Test</studentname>
<st1>PO Box 411</st1>
<st2>NULL</st2>
<st3>NULL</st3>
<city>MequonTest</city>
<state>TEST</state>
<zip>53092TEST</zip>
<ssn>111111111</ssn>
<tuition>1590</tuition>
<refund>0</refund>
<box4amt>0</box4amt>
<halftime>X</halftime>
<PROGRAM>UG</PROGRAM>
<grade>X</grade>
<custcode>P111111111</custcode>
<client_name>Test</client_name>
<addr_line1>100000 Test Ave</addr_line1>
<addr_line2>TEST TEST TEST </addr_line2>
<addr_line3>3.0143164E9</addr_line3>
<trayear>2011</trayear>
<amounts_billed_for_tuition>1590</amounts_billed_for_tuition>
<adj_prioryear>0</adj_prioryear>
<adj_scholarships_grants_prioryear>0</adj_scholarships_grants_prioryear>
<federal_id>11-1111111</federal_id>
<email>TEST@yahoo.com</email>
</Billing>
</1098>
Thanks in advance. I will be grateful if someone can help.I need to submit this project tomorrow morning.

Edward
tolu10@hotmail.com

Postnext
Ivan PedruzziSubject: CONVERT SQL Server data to XML.
Author: Ivan Pedruzzi
Date: 26 Jan 2012 10:25 AM
Originally Posted: 25 Jan 2012 06:57 PM
This is easy to do using Stylus Studio mapping tool, have a look at

http://www.stylusstudio.com/videos/ddxqdemo/datadirectxquery.html


Watch out, 1098 is not a valid element name, it has to start with _ or a letter.


Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Edward  FagbemiSubject: CONVERT SQL Server data to XML.
Author: Edward Fagbemi
Date: 26 Jan 2012 01:37 PM
Now it does not allow me to create a repeatable link for record. The repeatable link option is not available from the menu or the shortcut.
It is taking the entire values in a column and adding them to a tag instead of repeating for each record.

Pls help

Postnext
Ivan PedruzziSubject: CONVERT SQL Server data to XML.
Author: Ivan Pedruzzi
Date: 26 Jan 2012 02:04 PM

If an element does not repeat but you want to create a loop anyway, simply drag using the *right* mouse button and when the menu comes up, click on "create repeatable link".

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Edward  FagbemiSubject: CONVERT SQL Server data to XML.
Author: Edward Fagbemi
Date: 26 Jan 2012 02:30 PM
When I do it now it gives me values for the whole column. I want the values repeated for each row.
Pls help.

Postnext
Ivan PedruzziSubject: CONVERT SQL Server data to XML.
Author: Ivan Pedruzzi
Date: 26 Jan 2012 03:41 PM

Could you publish a screenshot of what you have designed so far?


Ivan Pedruzzi
Stylus Studio Team

Postnext
Edward  FagbemiSubject: CONVERT SQL Server data to XML.
Author: Edward Fagbemi
Date: 26 Jan 2012 04:26 PM
Ivan,
I have attached a screenshot.


Unknownstylusstudio1098T.doc
screen of table mapping TO xml

Postnext
Edward  FagbemiSubject: CONVERT SQL Server data to XML.
Author: Edward Fagbemi
Date: 26 Jan 2012 02:48 PM
When I do it now it gives me values for the whole column. I want the values repeated for each row.
Pls help.

Postnext
Edward  FagbemiSubject: CONVERT SQL Server data to XML.
Author: Edward Fagbemi
Date: 26 Jan 2012 04:28 PM
Ivan,

Pls help...Thanks

Postnext
Edward  FagbemiSubject: CONVERT SQL Server data to XML.
Author: Edward Fagbemi
Date: 26 Jan 2012 04:29 PM
Ivan,

Pls help...Thanks

Posttop
Ivan PedruzziSubject: CONVERT SQL Server data to XML.
Author: Ivan Pedruzzi
Date: 26 Jan 2012 05:46 PM

You need to draw an additional link from _x00032_01_1098T_WITH_SS_IDS to Billing.






Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
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.