I have an svg file defined as below ,
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<svg width="200mm" height="300mm"
xmlns="http://www.w3.org/2000/svg" dominant-baseline="hanging">
<text x="139.85mm" y="1.85mm" font-size="12pt">"studentName"</text>
<text x="142.05mm" y="289.72mm" font-size="12pt">"studentAge"</text>
</svg>
I have written a program to replace values stored in "" such as "studentName" with values that are actually assigned in program runtime , however I am finding it hard to replace all such values at once as I cannot apply the && operator.
Here is my code so far , would really appreciate some help
class Program
{
static void Main(string[] args)
{
Student student = new Student();
student.Name = "Max";
student.Age = "10";
string file = File.ReadAllText(@"D:\Del\structure.svg");
updatedDocu(file, student);
}
public static string updatedDocu(string intialDocument , Student studemt)
{
string updatedDoc = intialDocument.Replace("{studentName}", studemt.Name) && intialDocument.Replace("{studentAge}",studemt.Age);
return updatedDoc;
}
}
}
public class Student
{
public Student()
{
}
public string Name{ get; set; }
public string Age { get; set; }
}