Data->XML->Data
Conversion Application and Services

[ Login ]


Home

sTToXML Frequently Asked Questions

Please review the following frequently asked questions for insights into the usage of sTToXML.  We will use this FAQ page for a variety of issues and questions: operation, billing, customer service, etc.  Do visit regularly as will continue to update this page with communications with our users.

Please contact us if you have a question or issue and you don't see a corresponding topic below.  We will find an answer or resolution for you.
 

Do you have step-by-step instructions for using sTToXML?
What are the advantages of the text vs. database input driver choices when converting a .csv file to .XML?
What are the file formats used by sTToXML?
How do I export my XML information as a set of relational database tables?
How do I save a new reusable template?
When do I use single-column or double-column style attributes in my templates?
How are characters such as commas and linefeeds handled in sTToXML?
Why is the information I put in the first column of the template not included in XML file?
[Is there] a quick way to evaluate [sTToXML]?
How do I include all of my [Netsuite] store categories in the [smbxml] item templates?
How do I know which .csv template column matches which XML element?
May I change the .csv template column names to match my [legacy software system]?
[Why were] one of my XML documents flagged as "invalid" by XMLSpy?
Can I use my current spreadsheets with sTToXML?

Text vs. database input driver choices when converting a .csv file to .XML?

A text- or database- input driver can be specified when converting a .CSV files to XML.  Each choice has advantages; however, most significantly, the database driver allows commas within the spreadsheet cells.  Click here to see the advantage matrix and other details.

[top]

 


What are the file formats used by sTToXML?
 
File type Extension Notes
Comma delimited text file .csv, .txt
  • Text file delimiters such as commas and double quotes are not allowed.
Excel spreadsheet .xls
  • Column names can be no greater than 64 characters in length.
  • The base filename and the worksheet tab must be the same or the worksheet tab must be named "Sheet1".
  • All values in columns of of mixed data types, strings and numeric, must be explicitly converted to all strings.
XML .xml
  • XML documents must be valid i.e. follow the rules specified in the respective .DTD file.
  • The respective .DTD must already registered in sTToXML
[top]

 

 


How do I export my XML information as a set of relational database tables.?

sTToXML allows XML information to be converted to either flat-file or relational table format. 

1.Start sTToXML.

2. Select the XML to CSV menu option.

3. Browse to an XML file source file.  This XML file's language must be the same as in the screen XML language field.

4. Select the Relational button for Export File Type

5. Click the Upload and Convert button.  sTToXML will then upload your XML file and convert it to a number of normalized tables.

6. Download each of the tables to your local hard-drive. The tables are ready to be imported into your favorite RDMS manager.  The tables will automatically include the foreign keys for building the relationships between the related entities contained in the XML source file. Click here for more details of the files created by the relational database export option.

[top]

 


How do I save a new Reusable Template?

New reusable templates are saved via the CSV to XML screen.  The screen includes a field where you may assign a name for your reusable template.  The reusable template is made up of the columns in the uploaded spreadsheet file.  You may save multiple templates for each element.  You may also setup custom field-mapping within sTToXML.  This will allow you to use the column headings from your legacy data during conversion to XML.

Your reusable templates are utilized in the create template function.  You have a choice of  using a DTD based dynamic template or recalling one of your saved reusable templates.

[top]

 


When do I use single-column or double-column style attributes in my templates?

Single-column and double-column style attribute columns refers to the column layout used for element attribute information in sTToXML spreadsheet templates.

The single-column style attributes indicates the attribute name and value is included in the column header row.  Single-column style attributes are best suited for general usage and when attributes are used for annotation.  The single column style is easier to read visually and link to external data sources.  There is one spreadsheet column per element.

The double-column style attributes uses a separate spreadsheet column for each attribute in addtion to the normal data column.  The attribute name is in the column header and the attribute values are in the rows underneath.  Double-column style attributes are best suited for XML languages where data instead of annotations are contained in attributes i.e. the attribute values do not repeat and is specific to each record.  There are multiple spreadsheet columns for each element -- one column for the element data and one column for each attribute.

Single-Column Attributes Example

Two Netsuite smbxml custom fields using single-column attributes.  The attribute name is "name" and the attribute values are "Review_Date" and "Active Member".  The element data is contained in the data rows.
Double-Column Attributes Example

Two XML elements -- carModel and engine.  The attributes are make and layout respectively.  Note the attribute values for make and layout are in the rows.  Column BB and BD are element data.  Column BC and BE are attributes.  The attribute names are in the column header and the attribute values are in the rows.
[top]

 


How are characters such as commas and linefeeds handled in sTToXML?

sTToXML automatically replaces characters which will affect the layout of the target .csv spreadsheet during conversion of a XML document to a .CSV spreadsheet.  This includes:

commas
linefeeds
double quotes

Some other popular but extended characters are also automatically replaced.  These include the copyright, registered trademark, and degree symbol among others.  These popular extended characters are replaced as they may not be displayed by some text editors.

Click here to see a list of all characters which are automatically replaced by sTToXML.

[top]


 

 

How do I include all of my [Netsuite] store categories in the [smbxml] item templates?

sTToXML supports any number of "child" / "parent" type elements.  For example, you may use any number of store categories and at any depth for smbxml inventoryItem documents. 

The additional  element depth is created by inserting additional columns in the template .csv file.  Do note that care is needed when naming the new columns to keep intact the sTToXML logic which is included in the template.  See the examples below:

Original smbxml inventoryItem template columns
Supports 2 store category levels -- local and 1 parent
Modified to support a single store category up to 4 levels deep for a smbxml inventoryItem
Additional parentName columns are inserted to represent multiple category depths..  Note the grandparent/parent element names, "storeCategoryList/storeCategoryRef", are not repeated when additional columns are added.
The above spreadsheet can now accommodate up to 4 store category names in columns AE through AH.
Modified to support 2 store categories for an item where the categories are 4 levels deep
Additional storeCategoryRef groups are inserted to represent multiple store categories.  Note the group parent name, "storeCategoryList" is not repeated in the additional columns
The above spreadsheet template can now accommodate up to 2 store categories which may be up to 4 levels deep.  The first category will be in columns AE through AH and the second category will be in columns AI through AL.
The resultant XML document will include this fragment and the above data:
[top]

 
How do I know which .csv template column matches which XML element?

The template spreadsheet column names match the element names as specified in the XML language's DTD specifications.  However, some column names include additional information such as parent element names.  The parent element names are required by the sTToXML software to assist the program with its navigation. The parent and local element names are separated by the forward slash, "/", symbol.  The local element name is the last name listed in the column name.

This is an example of a column name which includes parent and local element information.

 

"id/idConstraint" represents the grandparent and parent elements to the "name" element.  The name element is XML element whose data would go into this column.  This is how the corresponding XML document would look:

It's critical to understand that the spelling, capitalization, and sequence of the columns in the template spreadsheet are not altered or rearranged.  Doing so will upset the relation between the .csv file and its XML information thus generating an invalid XML document or a program error message.

[top]


 
May I change the .csv template column names to match my [legacy software system]?

sTToXML now supports custom field mapping.  The custom column headings can be created / edited / maintained online within sTToXML by using the Template Management menu option.  Custom field mapping for a new template can also be setup from the from the Template function.

[top]


 
[Why were] one of my XML documents flagged as "invalid" by XMLSpy?

By design, sTToXML will not create any empty elements in its XML documents even if that element is required by the XML language's DTD specifications.  Stonehaven Technology's reasoning is preserving the safety of existing data in our users' computer systems.  The idea to prevent the scenario where existing data is accidentally overwritten by required but empty elements in an update XML document.

The safest method to update existing information is to:

- Convert the current XML information into a.csv spreadsheet.
- Make any desired data modifications in the spreadsheet. Leave all XML required columns in the spreadsheet.
- Convert the spreadsheet back into XML.

[top]


 

 

Can I use my current data spreadsheets with sTToXML?

You may certainly use the data in your spreadsheets for conversion into XML; however, the columns headings must be in the nomenclature, format, sequence as expected by sTToXML.   Essentially, you can replace your spreadsheet's column headers with the sTToXML expected headers and your data will convert easily to XML.

You may determine the sTToXML headers by:

1. Using the sTToXML Template function to create a spreadsheet template.  You can then use the header row from the template in your spreadsheets.  Please refer to this FAQ and your XML language documentation for assistance in interpreting the column names.

2. You may determine the header names complete with sample data in a single step.  Use sTToXML to convert an existing XML document into a CSV file.  Now you can easily see how the template column names correspond to the information in your data rows and columns.  A significant advantage is this spreadsheet will only contain the subset of columns that you are actually using in your application.

[top]


 

 

 [Is there] a quick way to evaluate [sTToXML]?

1. Create a template using the sTToXML function.

2. Fill each row and column with sequential numbers e.g.

row 1: 0,1,2,3,4,5,6,7....
row 2: 1,2,3,4,5,6,7,8...
row 3: 2,3,4,5,6,7,8,9...


(Do note the 1st column in a template spreadsheet is only as an element tag so sTToXML can identify the related XML element.)

3. Save the file and then convert it to XML using the sTToXML CSV to XML function.  You will now have an easy to read XML document which you can compare to the source spreadsheet.  [ed. I've found this makes an element XML reference sheet especially for the Netsuite functions I am not using.]

4. Convert the above XML document back into a spreadsheet using the sTToXML XML to CSV function.  You can quickly confirm that sTToXML was successful in moving information between a spreadsheet and an XML document.

[top]

 

Why is the information I put in the first column of the template not included in XML file?
The first column of sTToXML template spreadsheets is used for identifying the corresponding table / XML element.  Any information in this column will be ignored by the system.

[top]

Copyright 2004,2005,2006,2007,2008   Stonehaven Technology. All rights reserverd.  Home ] Contact Us ] Policies ] About This Site ]