.net/Saxon.Api: How to create a XdmValue of type xs:untypedAtomic?
Replies (3)
Please register to reply
Please register to reply
Added by Stefan Krause over 6 years ago
Perhaps I have overseen the obviuos, but: how can I create a @XdmValue@ with type @xs:untypedAtomic@?
My workaround for now is
xPathCompiler.Evaluate("xs:untypedAtomic('" + entry.Value + "')", null)
but this will fail if @entry.Value@ contains one or more apostrophs.
Thanks for your help,
Stefan
Please register to reply
Try:
new XdmAtomicValue("string", ItemType.UNTYPED_ATOMIC);
Thank your for the hint. This works for me:
XdmValue untypedAtomic = new XdmAtomicValue(entry.Value, QName.XDT_UNTYPED_ATOMIC, processor);
Sorry, I overlooked that this was .NET.
Please register to reply