472,805 Members | 2,118 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Edit XML From Dataset

If I save an xml file (with the schema) from a dataset, using
Dataset.WriteXML, I then wish to edit the file using XML Notepad. If I just
open it in XML Notepad and save it, without making any changes, the xml is
just about rendered useless, and I get an error "datatable does not support
schema" when trying to import it again. Is this a known issue, and is it
possible to edit with other tools?

Derek
Nov 8 '07 #1
2 1523
It sounds like XML Notepad is changing stuff. XML Notepad doesn't work like
a text editor. It actually has to parse the XML to display it to you as a
tree. When it writes it back out, it may be stripping out information such
as namespaces or some other key information that the Dataset needs.

Try editing it in a text editor instead and see if that works. You could
also grab Ultraedit (or another tool with file comparisons) and then
compare the version of the XML that XML notepad wrote out to the version
before loading in XML Notepad to see exactly what it's changing.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com
"Derek Hart" <de********@yahoo.comwrote in message
news:ui****************@TK2MSFTNGP05.phx.gbl...
If I save an xml file (with the schema) from a dataset, using
Dataset.WriteXML, I then wish to edit the file using XML Notepad. If I
just open it in XML Notepad and save it, without making any changes, the
xml is just about rendered useless, and I get an error "datatable does
not support schema" when trying to import it again. Is this a known
issue, and is it possible to edit with other tools?

Derek
Nov 8 '07 #2
As long as your edits are legal, the most likely cause is you are changing
code pages when you save. I would assume that the DataSet is saved as UTF-8.
Check notepad and see how you are saving. You can change code pages here.

The other option is you are making illegal changes to the XML.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Derek Hart" <de********@yahoo.comwrote in message
news:ui****************@TK2MSFTNGP05.phx.gbl...
If I save an xml file (with the schema) from a dataset, using
Dataset.WriteXML, I then wish to edit the file using XML Notepad. If I
just open it in XML Notepad and save it, without making any changes, the
xml is just about rendered useless, and I get an error "datatable does not
support schema" when trying to import it again. Is this a known issue, and
is it possible to edit with other tools?

Derek

Nov 8 '07 #3

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

Similar topics

6
by: Tamir Khason | last post by:
How to prevent the selected cell from being editable (visual) at DataGrid? Once click on cell (even readonly) there are cursor inside it and select text appears. How to prevent it Thankx
0
by: Steve Bishop | last post by:
I have a form with a search text box and a grid that displays the results. Within the grid, I have edit command links set up to response.redirect to another page that puts the DataKey value in the...
3
by: pmud | last post by:
Hi, I have an ASP.NET application using C# code. I am using a datagrid to display records from a database based on a user input, i.e a user enters a compnay name in text box & when he clicks a...
0
by: sJeev via DotNetMonster.com | last post by:
Please help, I am very new to asp.net and data grids have got me stuck for a loooong time. I can either have the right content in my datagrids or make them editable. In the first case, I make...
3
by: Jeff Brown | last post by:
Does anyone else ever feel like just giving up!!!!! When i edit a record and then update the database i get an error, although i can add a new record completely. The error is : An unhandled...
1
by: Kostis | last post by:
Hello there! I have created a windows application in VB.NET and I want to retrieve data from an access database. I create the OleDbConnection, an OleDbAdapter, a dataset and finally a Data Form...
3
by: misiek | last post by:
Hi all. I have following problem: 1. In my web page I have a GridView control, which does not have a DataSourceId set in designer. 2. When user presses Start button then I create...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
3
by: Joey | last post by:
asp.net 2.0 VS2005 C# In my web app I added a gridview and then manually configured boundcolumns, for an in-session dataset to act as a datasource. Then I added an Edit commandfield. When I...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.