Hi all i have xml file need to change that with diffrent languages
And after the translation the value in the text file should beCode:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><WebEditorDocument><Template Name="Test"/><Data><Paragraph Format="Text">The graph applies to a cleaning bend with cleaning cap and with the same dimension of take-off and main duct (Ød<Subscript>3</Subscript>=Ød<Subscript>1</Subscript>).</Paragraph><Paragraph Format="Text2">The pressure drop is about 30% lower for cleaning cap and Ød<Subscript>3</Subscript>=Ød<Subscript>1</Subscript>.</Paragraph><Paragraph Format="Text2">The pressure drop is about 30% lower for cleaning cap and one step smaller take-off dimension (Ød<Subscript>3 </Subscript>< Ød<Subscript>1</Subscript>).</Paragraph><Paragraph Format="Text2">The pressure drop is about 50% lower for cleaning cap KCU and one step smaller take-off dimension (Ød<Subscript>3 </Subscript>< Ød<Subscript>1</Subscript>).</Paragraph></Data></WebEditorDocument>
i tried to read the fileCode:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><WebEditorDocument><Template Name="Test"/><Data><Paragraph Format="Text">Diagrammet avser rensbar böj med renslucka samt med samma dimension på stos och huvudrör (Ød<Subscript>3</Subscript> = Ød<Subscript>1</Subscript>).</Paragraph><Paragraph Format="Text2">För renslucka samt Ød<Subscript>3</Subscript> = Ød<Subscript>1</Subscript>, är tryckfallet ca 30% <Break/>lägre.</Paragraph><Paragraph Format="Text">För renslucka samt ett stegs mindre stosdimension (Ød<Subscript>3</Subscript> < Ød<Subscript>1</Subscript>) är tryckfallet ca 30% lägre.</Paragraph><Paragraph Format="Text">För renslucka samt ett stegs mindre stosdimension (Ød<Subscript>3</Subscript> < Ød<Subscript>1</Subscript>) är tryckfallet ca 50% lägre.</Paragraph></Data></WebEditorDocument>
but getting problem near <subscript>3</subscript>,Code:try { StringReader srXmlValue = new StringReader(param.ParamValue.Replace("<Break/>", Environment.NewLine)); XmlTextReader trXmlValue = new XmlTextReader(srXmlValue); while (trXmlValue.Read()) { switch (trXmlValue.NodeType) { case XmlNodeType.Element: // The node is an element. if (trXmlValue.Name.Trim().ToLower() == "paragraph") { txtParamValue.Text += String.Format("[###Paragraph-{0}###]", trXmlValue["Format"]); txtParamValue.Text += Environment.NewLine; } break; case XmlNodeType.Text: //Display the text in each element. txtParamValue.Text += Environment.NewLine; txtParamValue.Text += trXmlValue.Value; // txtParamValue.Text += Environment.NewLine; // txtParamValue.Text += Environment.NewLine; break; } } } catch { txtParamValue.Text = param.ParamValue; }
i have to show the entire text in paragraph tag in richtextbox
thanks




Reply With Quote