Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 320f2edb authored by Harald Martini's avatar Harald Martini
Browse files

check if xmlns attribute is already set when writing airdrag node

parent 62b4c88f
No related branches found
No related tags found
No related merge requests found
......@@ -70,12 +70,15 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
protected XElement GetAirdragElement(IAirdragDeclarationInputData inputData, string version)
{
var retVal = new XElement(v24 + XMLNames.Component_AirDrag);
var tmp = XElement.Load(inputData.XMLSource.ParentNode.CreateNavigator().ReadSubtree());
var tmp = XElement.Load(inputData.XMLSource.CreateNavigator().ReadSubtree());
var dataElement = tmp.Descendants().Where(e => e.Name.LocalName == XMLNames.ComponentDataWrapper).First();
dataElement.Name =
v20 + XMLNames.ComponentDataWrapper;
dataElement.Add(new XAttribute("xmlns", inputData.DataSource.TypeVersion));
dataElement.SetAttributeValue("xmlns", inputData.DataSource.TypeVersion);
//dataElement.Add(new XAttribute("xmlns", inputData.DataSource.TypeVersion));
var signatureElement = tmp.Descendants().Where(e => e.Name.LocalName == XMLNames.DI_Signature).First();
signatureElement.Name = v20 + XMLNames.DI_Signature;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment