I am new to XML. A client requested to have our web application (C#) to generate an XML file. They gave us a sample XML file to use as a template (attached). We also have a stored procedure that returns the data needed to populate SOME of the fields in the XML file. sample.xml
I looked through some of the existing XML projects in our application (below) to hopefully get me started, but no luck.
xmldecl = doc.CreateXmlDeclaration("
1.0", "utf-8", null);
XmlElement root = doc.DocumentElement;
What is the best way to generate the attached XML file using C#?
Can I do the following?
string xmlString = @"
<?xml version="1.0" encoding="UTF-8"?>
<collectpay-payment-request xmlns="http://www.domain.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.domain.com ">