|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
GridView and XML problemsI'm having difficulty displaying some XML data in a GridView. My XML is something like: <root> <Person> <FirstName>Whatever1</FirstName> <LastName>Whatever1</LastName> </Person> <Person> <FirstName>Whatever2</FirstName> <LastName>Whatever2</LastName> </Person> </root> I only managed to display XML data using the XmlDataSource when the data is in XML attributes instead of XML elements. Something like <root> <Person FirstName="Whatever" LastName="Whatever"/> </root> Some help will be appreciated. Thanks. Did you define and load the xsd file beforehand? I do load xml like the
one you posted and it works nicely. Hi Remy,
No I don't have an xsd file. Can you give me a few short code samples of how you load/link the xsd, and how the xsd helps? Thanks, Michael Show quoteHide quote "Remy" <rblaett***@hotmail.com> wrote in message news:1136560090.913373.104710@f14g2000cwb.googlegroups.com... > Did you define and load the xsd file beforehand? I do load xml like the > one you posted and it works nicely. > As I don't see your code I cannot promise that the xsd will help, but
it's worth a try and you can definitely use xml the way you used it to load a datagrid. here is a good article on the whole subject: http://www.codeproject.com/aspnet/xmldatagrid.asp he unfortunately also uses attributes, but just use the example as a starting point and then convert it to your xml style. Cheers Remy
Other interesting topics
HttpWeb Request from Class Library fails to 500
when debugging long delay before hitting breakpoint in page load How do I convert a DataSet to a String from a WebService Don't show page in browser history asp.net 2.0 caching ASP.net 2.0 GridView edit mode problems Switching from http to https and back call functions by pointer? Issues with OnTextChanged using <asp:Repeater Interacting with Outlook |
|||||||||||||||||||||||