How to use remove operation in Function on sequence Using XPath in Xml

In this article I will explain remove operation of function on sequence.
  • 1628
Introduction

Their are several functions on sequences presents in XPath, Hear in this article I will explain the remove operation which is used to returns a new sequence constructed from the value of the item arguments - with the item specified by the position argument removed, means the position argument index position is removed from the items list using the remove method.

Syntax
 
remove((item,item,item.......),position)

The first arguments in the remove function is the number of item list where we want to search the second argument that is position and remove the item if it is match with the position index value.

Example

remove(("abc","abcd","pqr","pqrs","abpq"),1)
remove(("ab","cd","ef"),0)
remove(("ab","cd","ef"),2)
remove(("ab","cd","ef"),4)

Output

("abcd","pqr","pqrs","abpq")
("ab","cd","ef")
("ab","ef")
("ab","cd","ef")

Ask Your Question 

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

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.