Hi,
I have an XML string that looks like this:
<Attributes>
<ProductAttribute id="1">
<ProductAttributeValue>
<Value>a</Value>
</ProductAttributeValue>
</ProductAttribute>
<ProductAttribute id="2">
<ProductAttributeValue>
<Value>a</Value>
</ProductAttributeValue>
...
Hello,
Why databinding TwoWay don't work on the text property of a combobx in .net 4.0 (it's working in .net 3.5) ?
My code :
I have an xml file like this :
<xml>
<combobox option="" obs="tralala">
<option value="here" />
<option value="there" />
</combobox>
<combobox option="blue" obs="">
<option value="one" />
...
New question about the previous question
Previous question was:
I have to populate a few objects that contains 30-50 property from a few linq to xml results
is there a way to populate these object without having to manually write every specific prop=value for every property?
a kind of
(from xml in myXml select xml).ToLis...
As you can see, the schema.Elements returns three elements one of whom is an EntityContainer element.
But when I try to search thru the Elements overload specifying the "EntityContainer" (schema.<EntityContainer>) it doesn't retrieve anything.
...
We are currently developing a project in .NET that involves analyzing XML documents against a set of user defined rules. Here is an example:
<Person>
<Name>Bob</Name>
<Cars>
<Car Type="SUV" Color="Black"/>
<Car Type="Sports" Color="Red"/>
<Cars/>
</Person>
EG rules:
if person's name = "Bob" and has 2 cars then ......
I have an xml file that looks like this
<step>
<id>3</id>
<backid>1</backid>
<question>Are you having a good day</question>
<yesid>4</yesid>
<noid>5</noid>
</step>
It's set up to be an application that asks the user yes and no questions to assist in guiding the user through a complicated business process. T...
Hi,
I'm trying to write some C# code to read data from an XML file.
I thought I'd try out Linq to XML to do this.
However, the values I'm pulling out are surrounded by characters like "\n\t\t\t".
Can anyone explain why I'm getting these characters, and how I can remove them?
Thanks.
...
Consider the following XML:
<response>
<status_code>200</status_code>
<status_txt>OK</status_txt>
<data>
<url>http://bit.ly/b47LVi</url>
<hash>b47LVi</hash>
<global_hash>9EJa3m</global_hash>
<long_url>http://www.tumblr.com/docs/en/api#api_write</long_url>
<new_hash>0</new_hash>
</data>
</response>...
I have a xml in the below format and need to get the id and name of all the SubEntity when I pass the ParentEntityId. This needs to be done in silverlight.
<Treeview>
<ParentEntity ParentEntityId="1" ParentEntityName="P1">
<Facility FacilityId="F1" FacilityName="F1">
<Category CategoryId="C1" CategoryName="C1"/> ...
Hi,
I'm using Scott Gu's dynamic linq library for Linq to XMl. The problem is I don't know how to refer an element itself value inside of the dynamic query.
What I want to do is as follows:
var doc = XDocument.Load("test.xml");
var ret = doc.Descendants("Row").Where(x => x.Element("ID").Value == "2").ToList();
I want to replace the ...
I can't find any info about whether or not I should dispose/close this object after using it... Here is the msdn link: http://msdn.microsoft.com/en-us/library/bb343181.aspx
...
I create an XML Doc and wanted have a reference to the XSLT file.
//<?xml-stylesheet type="text/xsl" href="OBReport.xslt"?>
to this XML generation:
XElement xml = new XElement("ReportedOn",
from dl in EL.DocumentLog.ToList()
join o in EL.Organization
on dl.OrganizationID eq...
Hello,
I am generating a XElement having this structure:
<TestNames>\r\n <Test>YA</Test>\r\n <Test>YO</Test>\r\n </TestNames>
How do I get rid of the whitespaces and \r\n in a non-hack way :)
Update:
XElement testsXmlDocument= new XElement("TestNames");
foreach (string test in selectedTests)
testsXmlDocumen...
Hi
I’m trying to use Linq XML to select a number of nodes and the children but getting terrible confused!
In the example XML below I need to pull out all the <MostWanted> and all the Wanted with their child nodes but without the other nodes in between the Mostwanted and Wanted nodes.
This because each MostWanted can be followed by any ...
I have been trying to parse this xml in c#
<schema uri=http://blah.com/schema >
<itemGroups>
<itemGroup description="itemGroup1 label="itemGroup1">
<items>
<item description="The best" itemId="1" label="Nutella"/>
<item description="The worst" itemId="2" label="Vegemite"/>
</items>
</itemGroup...
I need to move sibling nodes before and after certain nodes. Here is the code im working with
<tabs>
<tab>
<name>Overview</name>
</tab>
<tab>
<name>Testing</name>
</tab>
<tab>
<name>Performance</name>
</tab>
<tab>
<name>Braking</name>
</tab>
</tabs>
I woul...
So, I can easily use LINQ to XML to traverse a properly set-up XML document. But I'm having some issues figuring out how to apply it to an HTML table. Here is the setup:
<table class='inner' width='100%'>
<tr>
<th>
Area
</th>
<th>
Date
</th>
<th>
ID
...
I have came across both these keywords in the VS Intellisense. I tried to googling the difference between them and did not get a clear answer. Which one of these have the best performce with small to medium XML files. Thanks
...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
XDocument xDocument = new XDocument(
new XElement("BookParticipants",
new XElem...
I have the following xml file and I am trying to use linq to xml to get the Elements which are residing inside the CDATA section. Any suggestions please.
<?xml version = "1.0" encoding = "UTF-8"?>
<result final = "true" transaction-id="84WO" xmlns="http://cp.com/rules/client">
<client id = "CustName'>
<quoteback>
</client>
<report fo...