Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: ASP.NET 2- Can't read data in XML file

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 4/4/2006 3:45:00 PM



noone wrote:

> YES works like charm. 

Fine. Some progress at least.

> What do I have to do to enable Add, Delete, update functionality to the site 
> I created with VWD.
> The buttons are there for Update an Deleting but they don't work, also how 
> do I Add to the XML file.

As far as I understand that currently (and I am not too familiar yet 
with the new ASP.NET 2.0 controls) editing is not possible if you do a 
transform first, see

<http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.xmldatasource(VS.80).aspx>

which says

"The XmlDataSource control is commonly used in read-only data scenarios 
where a data-bound control displays XML data. However, you can also use 
the XmlDataSource control to edit XML data. To edit the XML data, call 
the GetXmlDocument method to retrieve an XmlDataDocument object that is 
an in-memory representation of the XML data. You can use the object 
model exposed by the XmlDataDocument and XmlNode objects it contains or 
use an XPath filtering expression to manipulate data in the document. 
When you have made changes to the in-memory representation of the XML 
data, you can save it to disk by calling the Save method.

There are some restrictions to the editing capabilities of the 
XmlDataSource control:

The XML data must be loaded from an XML file that is indicated by the 
DataFile property, not from inline XML specified in the Data property.

No XSLT transformation can be specified in the Transform or 
TransformFile properties."


As the transform suggested earlier was necessary to get the GridView to 
display element contents at all I don't think there is an easy solution 
to use GridView and XmlDataSource to edit XML as you had.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent