473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Where do I start?

I've been given an .xsd schema file and a few spreadsheets, and have
been asked to create an xml file for thousands of rows of data from
those spreadsheets. The xsd schema cannot use Excel to create
the file due to some complex looping involved.

Where do I start in creating this xml file? I've looked for tools
that would help me out, but I haven't found anything that will allow
me to grab scattered information and plug it in so the program could
spit out xml. I really don't want to have to create a program to do
this if I can find one that meets my needs.

Any Ideas?

Thanks!

Linda

May 18 '07 #1
3 1830
Get the data out of the spreadsheets (for example, save as a CSV or TSV
file, if Excel can't save directly as XML -- I don't use Excel much and
haven't used a recent version at all, so I don't know whether it has an
XML export feature).

Then write an application that reads that simply-formatted text file and
builds your intended XML document based upon the information it
retrieves. If you *were* able to export as XSL (or if you want to start
by rewriting it into XML form), you can probably generate the final
document using an XSLT transformation; the other approach would be write
your own code, probably using the standard XML APIs (DOM or SAX,
depending on the nature of what you're doing) so you don't have to
reinvent too many wheels.

I'd suggest you start by reading some good getting-started-with-XML
tutorials, which will show you some of the tools available and give you
a grounding in the concepts you're going to need. Standard
recommendation: http://www.ibm.com/xml

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 19 '07 #2
On 18 May, 19:07, ferretwoman <ferretwoma...@yahoo.comwrote:
I've been given an .xsd schema file and a few spreadsheets, and have
been asked to create an xml file for thousands of rows of data from
those spreadsheets. The xsd schema cannot use Excel to create
the file due to some complex looping involved.
Where do I start in creating this xml file?
A lot depends on the "shape" of your data. Excel is a fairly simple 3-
dimensional rectilinear grid of cells, with each cell having a lot of
potential complexity. XML is an n-level hierarchical tree, usually of
simple string values (although you can data type things a little).
Mapping the simplest examples of each onto each other is easy enough,
the problems usually arise because a "table of cells" in Excel is
expected to generate a particular number of tree levels in XML, in a
manner that's application-dependent, not mechanically defined in Excel
and not defined by the XML Schema either. This requires either:
* hand-written code to loop around in Excel and generate appropriate
hierarchies in the XML,
or
* rather generic behaviour in the code that sniffs the data for
repeated row values and assumes the hierarchy from this
* Some extra markup in the XML Schema (additional to XML Schema
itself) that describes the column mappings.

As a pragmatic solution to your problems today, I'd write some Excel
VBA code that uses the M$oft MSXML XML DOM (easy enough to do from
within Excel and you should find plenty of example code out there).

I _wouldn't_ follow Joe's recommendation to dump out "Excel shaped"
data into another format, then process it further from there. That's a
recommendation that makes sense if you have an alternative format
available to you where you already have better tools you're more
familiar with. If however you're starting completely from scratch,
Excel isn't a bad place to be working with it anyway.

May 21 '07 #3
I pulled the information I needed into an Access database, then wrote
a small program to loop through all the items inserting the correct
information between tags, and output to a file. Just waiting now to
find out if it's properly formatted for the program that will be
reading the xml file.

Thanks for the suggestions - this was actually easier than I
originally thought it would be.

Linda

May 24 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nat | last post by:
Hi there, I have code as following but it returns error Error Type: Microsoft VBScript compilation (0x800A03F6) Expected 'End' /urbisjhdintranet/metadata/resultList.asp, line 324 which is the...
2
by: MT McNasty | last post by:
Hi. I'm trying to start modifying a VNC client (say RealVNC or UltraVNC). My problem is that I don't even know where to begin? I can't find a list of API's on any of them, and I just don't know...
2
by: GAVO. | last post by:
This probably is not the best group to post this question but any ways. I've been working with ms access for the last couple of years and gotten very good at it. I have never been on any ms...
7
by: Mr. Mountain | last post by:
In the following code I simulate work being done on different threads by sleeping a couple methods for about 40 ms. However, some of these methods that should finish in about 40 -80 ms take as long...
14
by: Odinn | last post by:
Greetings , This is my first year at programming and 3rd week at this so count me as a pure newbie. I am trying to make a program that gets a number and prints out starts as this: For input 3 :...
3
by: saundra | last post by:
This appears to be the code that is giving me trouble. Can someone help <? include("common.php"); require_once("$HeaderFile"); if(empty($_GET)){ $Start = '0'; }else{ $Start = $_GET;
5
by: =?Utf-8?B?cm9jY28=?= | last post by:
Hello, easy question: - what are the best books to start learning C#? Thanks! Rocco
2
by: Ceebaby via AccessMonster.com | last post by:
Hi Folks I wondered if someone could point me in the right direction before I completely tear my hair out. I have a user selection form where options can be selected for a report. Users now...
37
by: Phlip | last post by:
1230987za wrote: Kanze is a classically-trained "unit tester". In some circles "unit" is a QA concept - specifically, if a test fails, you only need to inspect one unit. So "units" are...
2
natalie99
by: natalie99 | last post by:
Hi All I thought this would be easy but I am having great difficulty! Could someone kindly please explain where I am going wrong? I have a single table of data, tblA each line shows a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.