0
我有這樣的XML字符串我有一個xml字符串,我想在C#中使用regex.Replace將2個標籤添加到exixtsing字符串中。我怎樣才能做到這一點?
<TaxType ident="XXX"><TaxMethod billingBasis="Net" billingUOM="Dollars-Gallon" />
<TaxRate>1.0</TaxRate><TaxAmount>10</TaxAmount><TaxDeferred yesOrNo="yes" />
<TaxExempt yesOrNo="No" />
</TaxType>
到
<TaxType ident="XXX"><TaxMethod billingBasis="Net" billingUOM="Dollars-Gallon" />
<TaxRate>1.0</TaxRate><TaxAmount>10</TaxAmount><TaxDeferred yesOrNo="yes" />
<TaxDeferredInvoiceNumber>12345</TaxDeferredInvoiceNumber>
<TaxDeferredPaymentDueDate>2012-01-23</TaxDeferredPaymentDueDate>
<TaxExempt yesOrNo="No" />
</TaxType>
即增加兩個額外的標籤exixting XML字符串。我如何使用regex.Replace在C#中做到這一點?任何人都可以建議嗎?
這看起來不像XML ......我甚至不知道那是什麼。 **編輯:沒關係** – FakeRainBrigand 2011-12-15 15:25:38
我只是假定他粘貼了不正確的數據格式。 – Chris 2011-12-15 15:27:19