none
How do I check string length of xml element equals zero? RRS feed

  • General discussion

  • I have the following xml code and I would like to check for string length for Rescheduled =0 in my if statement.

    Here is the xml code

    <xsl:when test="(Cancelled='True') and (string-length(RescheduledReason)=0)">Cancelled</xsl:when>

    Here is my if statement that I would like to add string length for RescheduledReason =0 as a condition.

    How do I do it?

    My C# code

    //HearingCancelled 
    if ((objxmlNode.SelectSingleNode("Cancelled") != null) && (objxmlNode.SelectSingleNode("Cancelled").InnerText == "True"))
    {
                                
      objPrepHearDoc.Hearing.Settings[i].SettingStatus = "Cancelled";
    }

     

    Tuesday, March 12, 2019 1:13 PM