C# Dev help Change linq to xml (req. linq to xml Expert)

Completed Posted 2 years ago Paid on delivery
Completed Paid on delivery

Hi

I need some help to update a c# program. The XML namespace has changed and i need to upgrade the program. You can edit the cs file and send it back to me.

Basecaly we need to do 2 things:

1. Add the new namespases, in top of the xml.

2. Add a prefix "base:" to some of elements

This need to be done in linq to xml with no hacks. The program validates against xsd files and this needs to be ok after the fix.

Take a look at the newlook and oldlook files.

You proberly only need to edit this line to fix add the new namespace:

var invoiceMain = new XElement(dataNamespace + "invoiceMain", invoice);

public static XNamespace dataNamespace = @"[login to view URL]";

public static XNamespace dataNamespaceBase = @"[login to view URL]";

public static XNamespace BaseNamespaceCommon = @"[login to view URL]";

var invoiceIssueDate = new XElement(dataNamespace + "invoiceIssueDate", "" + formatDateString(headderValues[(int)[login to view URL]]));

var invoiceNumber = new XElement(dataNamespace + "invoiceNumber", "" + headderValues[(int)[login to view URL]]);

Old look with only one Namespace

<?xml version="1.0" encoding="UTF-8"?>

-<InvoiceData xmlns="[login to view URL]">

To this:

<?xml version="1.0" encoding="UTF-8"?>

-<InvoiceData xmlns:base="[login to view URL]"

xmlns:common="[login to view URL]"

xsi:schemaLocation="[login to view URL] [login to view URL]"

xmlns:xsi="[login to view URL]"

xmlns="[login to view URL]">

And adding the BASE: prefix:

Old look without no prefix:

-<invoiceMain>

-<invoice>

-<invoiceHead>

-<supplierInfo>

-<supplierTaxNumber>

<taxpayerId>14862029</taxpayerId>

<countyCode>42</countyCode>

</supplierTaxNumber>

<postalCode>9099</postalCode>

New look with BASE prifix:

-<invoiceMain>

-<invoice>

-<invoiceHead>

-<supplierInfo>

-<supplierTaxNumber>

<base:taxpayerId>99999999</base:taxpayerId>

<base:vatCode>2</base:vatCode>

<base:countyCode>41</base:countyCode>

C# Programming XML

Project ID: #29848441

About the project

11 proposals Remote project Active 2 years ago

Awarded to:

writingapp

Hi. I have written many automation apps for formatting files including XML. Can format any XML templates to any other XML templates. Ready to write your project. Will complete within 1 day

€200 EUR in 1 day
(63 Reviews)
6.0

11 freelancers are bidding on average €211 for this job

Darwish001

Hi, Nice to meet you. I have full experience about C#/.NET so that I have confident to complete your project perfectly. I will be very happy to discuss about your project via chatting. Thank you.

€200 EUR in 7 days
(3 Reviews)
4.9
rahimc4d

Hi, I have experience in XML file writing programmatically. Here I see, csv to xml conversion. A sample csv file and the full running project would nice to have. Atleast a sample CSV file which I can run and test the More

€220 EUR in 5 days
(28 Reviews)
4.4
ScriptiZer

I am interested in this task. I am a Microsoft Certified .Net Application and Web Developer. Please send me a sample csv file for testing Looking forward to work with you. Thank you.

€200 EUR in 1 day
(0 Reviews)
2.6
dat30

Hello! It's been a while since last time I saw c#'s xml problems, but It brings me good memories. I'll be glad to help you, since c# and me are old friends XD. Please contact me, so we can talk about it.

€200 EUR in 1 day
(0 Reviews)
0.0
muttalibmm

Hi there, I'm interested to help to solve problem in your project. I have 7+ years of experience in C#.Net development. I've read your project detail very carefully and can output your desired results.

€201 EUR in 4 days
(0 Reviews)
0.0