Skip to main content

All Questions

Tagged with
0 votes
2 answers
85 views

linq issue accessing deep xml data

I'm trying to access xml data that's deep in an xml file with linq. I've been looking at these examples: linq linq I'm not seeing a good example that doesn't involve names. mid-question Update: ...
Michele's user avatar
  • 3,797
0 votes
1 answer
42 views

XElement - Find Node with Two Different Child Values

Using this list below: <People> <Continent>Asia</Continent> <TimeZone>Hong Kong Standard Time</TimeZone> <Person> <FirstName>Joe</...
Kieran Ojakangas's user avatar
0 votes
1 answer
94 views

Replace SVG innertext value with a href link

I am working with SVG file, that are same of XML. I need to replace InnerText of some elements with a href new element with its InnerText An example of my element is <text xmlns="http://www.w3....
chriswaddle's user avatar
1 vote
1 answer
34 views

C# Linq to XML getting of parent and child objects

I am trying to read in an XML file and then to populate the values into C# classes (parent and child objects). I have left out a lot of the code for brevity. I am trying to accomplish this via Linq to ...
Brendan Vogt's user avatar
  • 25.9k
0 votes
2 answers
72 views

Trying to get errors list of XML with XElement in C#

I'm trying to get the list of errors into the error tag from this XML that I received by RestRequest but my variable xmlerrors (var xmlerrors) is always null: <PositionOpeningResult xmlns:xsi="...
Mathlan89's user avatar
0 votes
2 answers
194 views

C# create XML file from Datatable with Linq

I am new to XML and want to create XML document from datatable I have a DataTable with following data: Database Example I need to create an XML file from above DataTable data as below: <Root> ...
johndemanfran's user avatar
0 votes
3 answers
214 views

C# Serializing an object into XML that includes a list of objects

I need to serialize an XML to attach for an API PUT request. I am using System.Xml.Serialization. The end result needs to resemble the following: <?xml version="1.0" encoding="UTF-8&...
tbproto's user avatar
0 votes
2 answers
80 views

Change the default value of XElement at runtime in C# using LINQ

How can I change the default value of the following XElement in C# using LINQ: <Automobile> <MainBlock>Car</MainBlock> <Name>Audi</Name> <Value> type="...
user2027571's user avatar
0 votes
1 answer
48 views

get elemets from elemets in complex XML using LINQ

I have a complex xml and I need to get all the elements <sdnEntry> containing the value "Individual" in the tag <sdnType> this is my XML: string list = @"<?xml ...
Emerson Rios's user avatar
1 vote
1 answer
221 views

C# create XML file from Datatable

I am new to XML and want to create XML document from datatable I have a DataTable with following data: Number DeptNo DeptName State Date Year DeptCode ELP 123A 1001 ...
DevP's user avatar
  • 75
0 votes
1 answer
41 views

In Linq to XML, how to you get ALL descendents of root?

In Linq to XML, how to you get ALL descendents of the root? I can't get my statement to even compile as it always says A query body must end with a select clause or group clause So given this XML (...
NickG's user avatar
  • 9,705
-1 votes
1 answer
83 views

C# Reading specific node under parent ID

So I know how to count the number of parent nodes under root. But I need to enumerate them, then select mod/rate based on the number of the parent in the order of the .xml document. It's important the ...
kdino's user avatar
  • 3
0 votes
2 answers
881 views

Getting Error while Parsing the Null value in XML file extrate using C#

I need small help for XML file Parsing. I am getting the error while Null value in XML file while iterating by for each loop. How to parse with different data Type with Null value. Source XML file : &...
skt's user avatar
  • 569
0 votes
1 answer
242 views

LINQ XML - Select multiple Elements at different hierarchy levels

In this Linq XML query, I want to select(return) multiple elements. I think multiple elements can often times be stored in a 'new' class, however, I don't know how to do this if they exist on ...
Ryan Daley's user avatar
0 votes
1 answer
137 views

If-Statement in the middle of XML Linq Query

I know similar threads about if statements combined with Linq already exist, but in most cases, they recommend setting up the condition before the query. In my case, the condition is an XML Element ...
Ryan Daley's user avatar

15 30 50 per page
1
2 3 4 5
119