[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: editing XML with Spreadsheets, most likely Excel

  • From: noah_mendelsohn@u...
  • To: "Stephen Green" <stephengreenubl@g...>
  • Date: Mon, 3 Dec 2007 00:07:53 -0500

Re:  editing XML with Spreadsheets
There's another approach that can be ok for very simple scenarios, and 
that's to put the tags directly in the spreadsheet and export as ascii or 
unicode, using a PERL script or the like for final cleanup.  This may seem 
goofy, but it's pretty easy to make a sheet that looks like:

<yourtag>  |  =refToFormulaForYourvalueHere | </yourtag>

where the | are meant to represent cell boundaries.  Copy those rows as 
many times as you need and export as text and you'll get a run of text 
that looks like

<yourtag>123</yourtag>
<yourtag>456</yourtag>

You can trivially wrap it in a document start/end tag, put on an XML 
declaration if you like, use string concatenation functions to build up 
attributes, etc.  Definitely not for complex nestings or mappings to 
elaborate existing XML schemas, but it's using the spreadsheet language in 
a style that's pretty natural for a spreadsheet person.  Depending on what 
else is in the sheet and how you export, you may wind up with other stuff 
before or after in the file, but it should be trivial to add marker lines 
and use a PERL script or the like to clip out the part you need.  Also, 
once you've got that simple XML, it's really easy to transform it to 
something more elaborate using XSLT or other XML tools.

As I say, not the right approach for the most robust of complex cases, but 
can be a really fine way to pull out simple information.

Noah

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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