XML schema

ggirf14

New Member
Joined
Nov 8, 2016
Messages
49
I'm trying to edit an XML file with Excel 2013 (Office Pro)
The source have the following 2 lines at the top:
<!--?xml version="1.0" encoding="utf-8"?-->
<arrayofsessiondata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

I cannot find a way to save as XML with excel and get the same two first lines I get the following:
<!--?xml version="1.0" encoding="UTF-8" standalone="yes"?-->
<arrayofsessiondata>

Problem is an error message from the application that needs to use the edited file from Excel.

System.InvalidOperationException: There is an error in XML document (10, 176). ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatinfo info, Boolean parseDecimal)

1- I started by importing the schema using Developer / XML Import
2- I tried to replace the two first lines to match the original document with no luck.


Question: How can I edit an XML file without changing the format or schema?

Leaving for the weekend ... hoping to read feedback Monday.

Thank you
Gilles.</arrayofsessiondata></arrayofsessiondata>
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top