Line breaks not found in XML attribute in browser form - InfoPath Dev
in

InfoPath Dev

Line breaks not found in XML attribute in browser form

Last post 06-24-2014 07:23 AM by gcookaustin. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-24-2014 07:23 AM

    Line breaks not found in XML attribute in browser form

    Hello,

    I am having a problem with the browser version of my form not being able to find line breaks in a secondary XML data source.  The XML data is obtained using SharePoint's owssvr.dll url.  My aim is to replace them in strings with <br> tags which I have confirmed display correctly in rich text boxes.  So for debugging purposes the following code will determine whether it encounters a line break in my ows_Note attribute:

    if (iRows.Current.SelectSingleNode("@ows_Note", NamespaceManager).Value.ToString().Contains("\n"))

    {

        TextToDisplay = "Contains newline";

    }

    else

    {

        TextToDisplay = "Doesn't contain newline";

    }


    I get "Contains newline" when run in the client and "Doesn't contain newline" when this code runs in the browser form.  I have also tried whether it contains System.Environment.NewLine, "\r", "&#10", "&#13", "&#xA", and "&#xD" with no success in the browser form.  I have searched for this problem but didn't find any posts with the same issue... Does anyone have any other ideas to detect line breaks in XML in a browser form?

    Thanks! :)

     

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.