Re: how to get data from xml
Not sure why you want to list all data in gridview, but try to change XNode to stringList<string> list1 = ( from n in xdoc.Root.Elements("game").Elements("description").Nodes() select...
View ArticleRe: how to get data from xml
Property accessor 'NodeType' on object 'System.Xml.Linq.XText' threw the following exception:'Object does not match target type.'
View ArticleRe: how to get data from xml
You may want to try just using the following syntax : //Your XML Document XDocument xdoc = XDocument.Load("C:\\Projekti\\xml\\XMLFile.xml"); //Your nodes (you could alternatively use var instead of...
View ArticleRe: how to get data from xml
Property accessor 'NodeType' on object 'System.Xml.Linq.XText' threw the following exception:'Object does not match target type.'my code://Load xml XDocument xdoc =...
View ArticleRe: how to get data from xml
You are currently binding your GridView datasource to a single instance of your List, however it is expecting an entire collection, so you would have to bind the actual list itself :...
View ArticleRe: how to get data from xml
You said you need "only Carpi - Lecce".list1[1] is a string that contains "Carpi - Lecce"TryGridView1.DataSource = list1;
View ArticleRe: how to get data from xml
Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource.Description:An unhandled exception occurred during the execution of the current web request. Please review...
View ArticleRe: how to get data from xml
Sure, because Value contents all nodes between <description>...<description><description><category id="SOCMENEURITASCA" order="7000">Ita. Lega Pro Div 1A</category> Carpi...
View ArticleRe: how to get data from xml
In your case I got result: Ita. Lega Pro Div 1ACarpi - LeccePlay-offI need result only Carpi - Lecce
View ArticleRe: how to get data from xml
Your xml is<description><category id="SOCMENEURITASCA" order="7000">Ita. Lega Pro Div 1A</category> Carpi - Lecce<BR/><span>Play-off </span>:...
View ArticleRe: how to get data from xml
Hi,Still I need your help.<description> <category id="SOCMENEURITASCA" order="7000">Ita. Lega Pro Div 1A</category>Carpi - Lecce<BR/><span>Play-off </span>:...
View ArticleRe: how to get data from xml
thanks.I tried to get:<punter-odds id="123"> <game id="24137372" date="20130609" time="1500"> <description> <category id="SOCMENEURITASCA" order="7000">Ita. Lega Pro...
View ArticleRe: how to get data from xml
Simple example as follow:XDocument doc = XDocument.Load("XMLFile1.xml"); dataGridView1.DataSource = (from table in doc.Root.Elements("Table") select new { Id = (int)table.Element("id"), Name =...
View Articlehow to get data from xml
Hi,my XML:<punter-odds id="123"><game id="24137372" date="20130609" time="1500"><description><category id="SOCMENEURITASCA" order="7000">Ita. Lega Pro Div...
View ArticleRe: how to get data from xml
You need to filter out time by current grid item. You can do it using DataKeys collection.In your xml you have<game id="24150953" date="20130611" time="2230">where id could be used as a unique...
View ArticleRe: how to get data from xml
Your code is ok but shows more records.<punter-odds id="123"><game id="24150953" date="20130611" time="2230"><description><category id="SOCMENINTINTQULAME" order="1600">World...
View ArticleRe: how to get data from xml
Here's again regarding xml format.A gridview supposed to have some table like structure like <alternative odds="1.35" team="17347">1</alternative><alternative odds="4.30"...
View ArticleRe: how to get data from xml
Maybe you can help me:<punter-odds id="123"><game id="24150953" date="20130611" time="2230"><description><category id="SOCMENINTINTQULAME" order="1600">World Cup Qual. - S....
View ArticleRe: how to get data from xml
This can do the trickvar list1 = ( from n in xdoc.Root.Elements("game").Elements("description") select new { Id = n.Element("category").NextNode.NextNode.NextNode.ToString().Replace("<span>",...
View ArticleRe: how to get data from xml
Thanks works.I how to get: <category id="SOCMENEURITASCA" order="7000">Ita. Lega Pro Div 1A</category>Carpi - Lecce<BR/><span>Play-off </span>Play-off in my example?
View Article