locked
This is an unexpected token. The expected token is 'SEMICOLON' while Loading xml file which is read from share point RRS feed

  • Question

  • Hi Everybody,

        I am reading xml file from share point which is uploaded already. For reading I used SPFile.Openbinary().....

    the problem is after reading the xml file from share point, i tried to load the xml file in to XMLDocument object

    xmlDoc.LoadXml(gxmlContent);

     But ist is throwing an exception "This is an unexpected token. The expected token is 'SEMICOLON'".

    exception thrown because that xml file contains Special character &....

    I uploaded the following part of xml to share point...

     


    <PartDescription title="SKIL: And Then There Was One…A Great Consolidation Play in a Growing Market at 12x Pro-Forma EPS. Initiating Coverage With a Buy Rating and $10 Price Target."
      synopsis="RESEARCH REPORT WITH TABLES/TEXT ~Suitable for All investment styles * Companies-focused fundamental research (fundamental): outlook for ." abstract="" description="">

     

    But at the time of reading the xml file from share point it will be


    <PartDescription title="SKIL: And Then There Was Oneb &A Great Consolidation Play in a Growing Market at 12x Pro-Forma EPS.  Initiating Coverage With a Buy Rating and $10 Price Target."
                     synopsis="RESEARCH REPORT WITH TABLES/TEXT&#xD;&#xA;~Suitable for All investment styles&#xD;&#xA;&#xD;&#xA;* Companies-focused fundamental research (fundamental):   outlook for .&#xD;&#xA;&#xD;&#xA;" abstract="" description="">

    any one can help me how to read the sharepoint data with out these special character..

     

    Note:

     I think the problem is, i am reading as binary data from share point :( . how to read the XML file from share point?.

    your suggestion is valuable to me..

     

    Thanks

    Mahesh Kannan

     

    Tuesday, January 9, 2007 1:58 PM

Answers