Changing value tags in xml string for report translation

A

Andrus

I have rdl report in xml like below.
I need to wrap all label <Value> tag contents to =Res.IR method call.

For example
<Value>ProductId</Value>

should be replaced with

<Value>=Res.IR("ProductId")</Value>

Value tags which start with = character should not replaced.
How to process such xml ?


Andrus.


</Textbox>
<Textbox Name="Textbox8">
<Top>3.07cm</Top>
<Left>17.11cm</Left>
<Width>1.89cm</Width>
<Height>0.55cm</Height>
<CanShrink>true</CanShrink>
<ZIndex>200</ZIndex>
<Value>=test.GetRegnr()</Value>
<Style>
<FontFamily>Times New Roman</FontFamily>
<FontSize>12pt</FontSize>
<TextAlign>Right</TextAlign>
</Style>
</Textbox>
<Textbox Name="Label3">
<Top>3.09cm</Top>
<Left>15.58cm</Left>
<Height>0.53cm</Height>
<CanGrow>false</CanGrow>
<CanShrink>true</CanShrink>
<ZIndex>200</ZIndex>
<Value>ProductId</Value>
<Width>1.51cm</Width>
<Style>
<FontFamily>Times New Roman</FontFamily>
<FontSize>12pt</FontSize>
</Style>
</Textbox>
 
M

mario

Hi,

Well you can do it by using XMLDocument and xpath to get all the nodes
you want and then simply parse the string elements.

Mario
GemBox Software
--
GemBox.Spreadsheet for .NET - Easily read and write Excel (XLS, XLSX
or CSV)
or export to HTML files from your .NET apps. See
http://www.gemboxsoftware.com/GBSpreadsheet.htm
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top