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

In this article I will explain lang operation of Boolean function.
  • 1774

Introduction

The  lang operation in  Boolean  function can be used to match the attribute value in the node-sets.If the argument of the lang operation can be match with the attribute of the current node then the boolean value true is return otherwise return false.

Syntax

boolean lang(string)

Example

Suppose the argument that we pass in the lang function is "en" that is
lang("en")

then the following node-sets current nodes attributes will be checked:

<xml lang="en">
<xml lang="en">
<xml lang="eng">

Output

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.