Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Keep schemaLocation attribute when saving to XML data from Excel

I have an XML file that is related to an XML Schema. Then I open the file in
Excel, edit some data, and save the file as XML Data.
Problem: The resulting XML file is no longer related to the XML Schema.

If I do the same in Word (Office Professional 2003), the schemaLocation
attribute is kept. How can I make sure this happens in Excel (Office
Professional 2003) as well?

Alternative angle:
I don't want to lose the empty elements when saving to an XML file from
Excel. As long as the XML file is related to the schema, these elements are
kept. But if one edits the file a second time, since it is no longer related
to the schema, the empty elements will be lost. Is it perhaps possible to
solve it some other way than through keeping the schema relation?

Simple example of the xml file:
<?xml version="1.0" encoding="ISO-8859-1"?
<EquInfo xmlns="http://www.yyy.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.yyy.com exampleSchema.xsd"
<Row rowId="1"
<EquipmentEquNewType</Equipment
<Manufacturer</Manufacturer
<Model</Model
</Row
</EquInfo

The XML Schema:
<?xml version="1.0"?
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.yyy.com"
xmlns="http://www.yyy.com"
elementFormDefault="qualified"
<xs:element name="EquInfo"
<xs:complexType
<xs:sequence
<xs:element name="Row" maxOccurs="unbounded"
<xs:complexType
<xs:sequence
<xs:element name="Equipment" type="xs:string"/
<xs:element name="Manufacturer" type="xs:string"/
<xs:element name="Model" type="xs:string"/
</xs:sequence
<xs:attribute name="rowId" type="xs:positiveInteger"
use="required"/
</xs:complexType
</xs:element
</xs:sequence
</xs:complexType
</xs:element
</xs:schema

Thank you in advance!

best regards,
Erik Braten
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Caption attribute at Cell in Excel XML dob_xml Excel Discussion (Misc queries) 0 November 27th 06 12:05 PM
Saving data in Excel Wayne in Maine Excel Discussion (Misc queries) 1 June 3rd 06 01:22 PM
sorting data by a certain attribute ebt Excel Worksheet Functions 2 April 2nd 06 03:04 AM
How do I change the default attribute in excel? worken Excel Discussion (Misc queries) 2 January 31st 06 01:56 AM
the attribute "nullable" is not supported in convert excel to xml Guttjung Excel Discussion (Misc queries) 0 June 27th 05 10:35 AM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"