Macaulay2 » Documentation
Packages » OpenMath :: val
next | previous | forward | backward | up | index | toc

# val -- Evaluate an XMLnode containing OpenMath

- Usage:
    `val x`
- Inputs:
  - x
- Outputs:
  - the value of the OpenMath object described by x

## Description

    i1 : t = parse ///<OMA><OMS cd="arith1" name="plus"/><OMI>1</OMI><OMI>2</OMI></OMA>///

    o1 = <OMA
           <OMS cd="arith1" name="plus"
           <OMI "1"
           <OMI "2"

    o1 : XMLnode

    i2 : val t

    o2 = 3

## See also

- openMath -- Turn an arbitrary Macaulay2 object into OpenMath (if possible)

## Ways to use val:

- `val(XMLnode)`

## For the programmer

The object val is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/OpenMath.m2:109:0.