linq-to-xml Questions

9

Solved

I am trying to read a xml file from the web and parse it out using XDocument. It normally works fine but sometimes it gives me this error for day: **' ', hexadecimal value 0x1F, is an invalid cha...
Require asked 18/7, 2011 at 3:16

5

Solved

I am revising some XHTML files authored by another party. As part of this effort, I am doing some bulk editing via Linq to XML. I've just noticed that some of the original source XHTML files conta...
Cause asked 18/9, 2014 at 15:37

1

Solved

(TLDR at the bottom) We have a legacy system that has implemented its own XML reader/writer. The problem is that it allows a literal "&" inside a property value. <SB nae="Name" net="HV &am...
Lonee asked 23/10, 2018 at 13:54

3

Solved

I want to be able to write XML to a String with the declaration and with UTF-8 encoding. This seems mighty tricky to accomplish. I have read around a bit and tried some of the popular answers for ...
Koon asked 6/10, 2010 at 10:56

2

Solved

i have a datatable that looks like the following type cname ctable text allowgroupping StringFilter AAA Table1 Good,Bad Yes StringFilter BBB Table2 Ugly No StringFilter CCC Table3 Lucky Yes and ...
Astera asked 25/7, 2013 at 20:57

6

Solved

I have an HTML form that i'm trying to load using XDocument.Load, and i'm receiving the following error: ' ' is an unexpected token. The expected token is ';'. Line 1257, position 66. at System.X...
Kymric asked 29/7, 2013 at 18:41

4

How can I change an attribute of an element in an XML file, using C#?
Yacht asked 15/12, 2008 at 8:2

2

Solved

<?xml version="1.0" encoding="utf-8"?> <rsp stat="ok"> <image_hash>cxmHM</image_hash> <delete_hash>NNy6VNpiAA</delete_hash> <original_image>http://imgur...
Embouchure asked 10/8, 2010 at 15:27

5

Solved

I have a string in a ASP.NET MVC details page with the value of <this><is sample = "attribute"><xml><power>!!!</power></xml><oh><yeah></yeah>...
Mcmasters asked 6/2, 2012 at 16:10

2

Solved

I need to have XML encoding and version at the top of my XML document which I am making with XDocument. I have this but it is in lowercase, and it needs to be in uppercase. What do I need to do? ...
Impudence asked 17/12, 2011 at 20:19

2

Solved

I have two XML files with same base format, but some of the tags and attributes in Master.XML aren't contained in the Child.XML. I need to Merge the XML files into new one XML file with missing ta...
Beaverbrook asked 26/3, 2018 at 3:44

5

Solved

My XML is: <CurrentWeather> <Location>Berlin</Location> </CurrentWeather> I want the string "Berlin", how do get contents out of the element Location, something like Inn...
Rossen asked 3/11, 2009 at 15:22

4

Solved

This is an offshoot from this question Why is the HttpWebRequest body val null after "crossing the Rubicon"? which was answered (one hurdle is leapt), but the next hurdle trips me up. Wi...
Lamprophyre asked 14/3, 2014 at 19:1

2

Solved

I'm using Linq to XML to create a new XML file. Some part of the file do I get from an existing XML file. I use the following code for this. var v2 = new XDocument( new XDeclaration("1.0", "utf-1...
Patagonia asked 2/12, 2010 at 21:24

3

Solved

This is my Entity Class with an Entity : [Table(Name = "CLINICAL_ITEM_MASTER")] public class ClinicalItemMaster { [Column] public int CLIENT_INPUT_MHS_ID { get; set; } [Column] public Guid CLI...
Romp asked 16/1, 2014 at 6:43

4

Solved

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SetNat...
Km asked 13/8, 2012 at 11:52

1

Solved

So I am running into an issue when I run a security scan on my application. It turns out that I am failing to protect against XXE. Here is a short snippet showing the offending code: static void M...
Immigrate asked 19/9, 2017 at 15:16

3

I have to read an XML file, that has no root element, to extract contained data. The XML has many elements like these: <DocumentElement> <LOG_x0020_ParityRate> <DATE>12/09/2017...
Jacky asked 14/9, 2017 at 13:42

3

Solved

Given below is my xml: <?xml version="1.0" encoding="utf-8"?> <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlse...
Souse asked 2/6, 2011 at 12:20

2

Solved

Is that possible to get current Enumerator (...or iterator? Don't know which tern is the correct one) in a LINQ query ? For example, I try to create a XML output (via LINQ to XML) of all currently...
Thyestes asked 20/9, 2011 at 17:44

3

Solved

I want to use LINQ to convert input XML to output XML by performing GROUPBY on "Summary" field and SUM up the Balance field. Input XML: <Root> <Account> <Summary>Checking<...
Desantis asked 9/4, 2011 at 6:25

3

Solved

I've xml as following: <?xml version="1.0" encoding="UTF-8"?> <root> <data name="LogIn">Log In</data> <data name="Password">Password</data> </root> I ...
Sidney asked 19/12, 2012 at 12:24

4

Solved

When I load an XML document from disk into an XDocument, that XDocument has a ready-only property BaseUri that contains the original XML document's location on disk. In other words, XDocument doc...
Dott asked 17/9, 2009 at 16:48

4

Solved

I have this code : /*string theXml = @"<Response xmlns=""http://myvalue.com""><Result xmlns:a=""http://schemas.datacontract.org/2004/07/My.Namespace"" xmlns:i=""http://www.w3.org/2001/XML...
Danieladaniele asked 26/2, 2010 at 8:50

4

Solved

I am using the (.NET 3.5 SP1) System.Xml.Linq namespace to populate an html template document with div tags of data (and then save it to disk). Sometimes the div tags are empty and this seems to be...
Kinross asked 20/1, 2009 at 19:31

© 2022 - 2024 — McMap. All rights reserved.