1. Home
  2. /
  3. Xquery
  4. /
  5. Sum of Array

Sum of Array - Xquery Typing CST Test

Loading…

Sum of Array — Xquery Code

Calculates sum of a sequence of numbers.

sum((1,2,3,4,5))

Xquery Language Guide

XQuery is a functional, expression-oriented language designed for querying, transforming, and manipulating XML data. It provides powerful tools for navigating hierarchical structures using XPath and is widely used in systems that store or exchange data in XML.

Primary Use Cases

  • ▸Querying XML databases (e.g., BaseX, eXist-db, MarkLogic)
  • ▸Transforming XML documents
  • ▸Integrating heterogeneous data sources
  • ▸Building APIs and services that output XML/JSON
  • ▸Metadata processing and document-driven workflows

Notable Features

  • ▸XPath-based navigation
  • ▸Functional expressions and immutability
  • ▸FLWOR expressions for structured querying
  • ▸Native XML manipulation
  • ▸Support for XML, JSON, and text output formats

Origin & Creator

Developed by the W3C XML Query Working Group in the early 2000s as a standard querying language for XML.

Industrial Note

XQuery is especially prominent in enterprise environments involving XML databases, digital publishing, content management, e-commerce feeds, and metadata-heavy systems.

More Xquery Typing Exercises

XQuery Counter and Theme ToggleXQuery Fibonacci SequenceXQuery FactorialXQuery Prime CheckerXQuery Reverse StringXQuery Multiplication TableXQuery Celsius to FahrenheitXQuery Simple AlarmXQuery Random Walk Simulation

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher