codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  `section` is an unexpected token. Expecting white space. Line 1, position 137.  TAS at 14:02 on Monday, June 22, 2009
 

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.....


  Re: `section` is an unexpected token. Expecting white space. Line 1, position 137.  arash farhad at 04:06 on Saturday, March 06, 2010
 

Beautiful blog with great informational content. Mostly certifications related and white space related topics are really very good. <a href="http://www.sure-braindumps.com/70-536.htm">dumps for 70-536</a>, <a href="http://www.sure-braindumps.com/VCP-410.htm">VCP-410 dumps</a> and <a href="http://www.sure-braindumps.com/70-270.htm">70-270 braindumps</a> are also good topics. Thanks for this great sharing.

<Added>

Beautiful blog with great informational content. Mostly certifications related and white space related topics are really very good. dumps for 70-536, VCP-410 dumps and 70-270 braindumps are also good topics. Thanks for this great sharing.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: repaint() slow performence..
•  Re: How Can I Get The Height Of A Hidden <div>?
•  Re: Firefox/IE doctype problem.
•  Re: Plz its urgent:validation code
•  Re: Write text strings to Serial Port
•  Re: Error configuring webservice identity in reporting services 2005
•  Re: sort hash by value, numerically
•  Re: Accessing user control in master page from any content page
•  Re: developing a bookselling system using jsp: need help in fixing database error


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010