CodeToad Forums » C++ » `section` is an unexpected token. Expecting white space. Line 1, position 137.
|
|
|
Hi,
Can you help me as soon as possible....
In my xml file,
<footnote><num>3</num><p><text>Ie under the Partnership Act 1961 s 13 (see <inrf id="hlm.160.013">[160.013]</inrf>): s 14.</text></p></footnote>
I want to replace the above line as
<footnote><num>3</num><p><text>Ie under the <strfact><strf>Partnership Act 1961</strf><sec>s 13</sec></strfact> (see <inrf id="hlm.160.013">[160.013]</inrf>): s 14.</text></p></footnote>
I get the footnote element from the root and then try to find out the strFindVal. If it is, then replaced as strRepVal.
My C# coding lines:
string strFindVal = "Partnership Act 1961 s 13";
string strRepVal = "<strfact><strf>Partnership Act 1961</strf><sec>s 13</sec></strfact>";
if (xnRep.Item(k).ChildNodes[s].Name == "footnote")
{
if (xnRep.Item(k).ChildNodes[s].InnerXml.Contains(strFindVal))
xnRep.Item(k).ChildNodes[s].InnerXml = xnRep.Item(k).ChildNodes[s].InnerXml.Replace(strFindVal, strRepVal);
}
Thanks in advance.....
<Added>
Hi,
Can you help me as soon as possible....
In my xml file,
<footnote><num>3</num><p><text>Ie under the Partnership Act 1961 s 13 (see <inrf id="hlm.160.013">[160.013]</inrf>): s 14.</text></p></footnote>
I want to replace the above line as
<footnote><num>3</num><p><text>Ie under the <strfact><strf>Partnership Act 1961</strf><sec>s 13</sec></strfact> (see <inrf id="hlm.160.013">[160.013]</inrf>): s 14.</text></p></footnote>
I get the footnote element from the root and then try to find out the strFindVal. If it is, then replaced as strRepVal.
My C# coding lines:
string strFindVal = "Partnership Act 1961 s 13";
string strRepVal = "<strfact><strf>Partnership Act 1961</strf><sec>s 13</sec></strfact>";
if (xnRep.Item(k).ChildNodes[s].Name == "footnote")
{
if (xnRep.Item(k).ChildNodes[s].InnerXml.Contains(strFindVal))
xnRep.Item(k).ChildNodes[s].InnerXml = xnRep.Item(k).ChildNodes[s].InnerXml.Replace(strFindVal, strRepVal);
}
I am getting an error as 'section' is an unexpected token. Expecting white space. Line 1, position 137. Pls help me
Thanks in advance.....
|
|
|
|
|
|
|
|
|
|