How to use boolean operation in Boolean Function Using XPath in Xml

In this article I will explain boolean operation of Boolean function.
  • 1776

Introduction

The  Boolean operation in  Boolean  function can be used to converts the argument/parameter into the boolean format. Some points regarding the number function are:

If the argument is a positive or a negative number then the Boolean value is true.
If the argument is a zero (0) or NaN then the Boolean value is false.
If the argument is a  non-empty string then it is converted to boolean value true.
If the argument is a empty string then the boolean value is false for it.
If the argument is a  non-empty node-sets then it is converted to boolean value true.
If the argument is a empty node-sets then the boolean value is false for it.

Syntax

boolean boolean (argument)

Example

Boolean(123)
Boolean(-4321)
Boolean(NaN)
Boolean(0)
Boolean(1)
Boolean('Richa garg')
Boolean(' ')

Output

True
True
False
False
True
True
False

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.