Construct an XdmMap from JSON file (for use as XQuery context item)

Andreas Sewe <andreas_sewe-+IBl0H0C+Lsf95zv9F5CbQC/[email protected]>
Newsgroups gmane.text.xml.saxon.help
Message-ID <[email protected]>
Hi,

I am using the S9API and am wondering to how set an XQueryEvaluator's
context item to a map obtained from a JSON file. For XML inputs I do the
following

  XQueryEvaluator evaluator = executable.load();
  XdmItem contextItem =
    processor.newDocumentBuilder().build(new StreamSource(xml));
  evaluator.setContextItem(contextItem);

But for JSON inputs I haven't found an analogue of DocumentBuilder. Does
it exist somewhere? If so, where?

Best wishes,

Andreas

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEENQNppz9Dfe6AGYg4LHyYYW0ubKsFAl8pRmsACgkQLHyYYW0u
bKsn1xAAmnY/wGcCnsdIqXZhZ4OkR4tJEH4QP/Y/FwXCoVrnYG4orzvh2q4Naspq
Rx1TmkKhYSrWSAAg2/efP62zYolbauMXt8j/DiDZZ27dCvQ5/HXY58i89D8OG67K
AEiWKzxtnvm6+aDsGrCtfi7J0OI0kXt8HQmuOAQVSJREa6ljMDV2oVHLlKOhj7h+
WNYgLxvunqR5EBCdaYcWO+i00U2zvij4hi9m8LPywX80jhvhiRwmXB6TDz8SZtZV
QCCOXt3ZWRrPRRRImZBEbvKcEH1WqeLjh3we+UjJWsbpCZfuoGYR74hbJ/sBjZck
VmKagA+NHXEBrXCRx3C3EmFzEfFJF60RQelPGlY8pp4n3rqvUNFHx0osRl/BE9X8
xiIdxmRvG/5r+eSdglBm5JvtBFL3qi9HHXJE+UHQyQ2LgTKvKk8CIcc0XrWHC1tv
gB4h9rjHXgBJ1PlIZ2YSxV1FKEktIc3Fl4dzV2H4U/vm9G1reDb7f0WFWiDkWQez
BpnECDeoA4l0eOEECHnc8VdIbKjdnWBKZadai6nh6z8KEECsNmY4T8IVQYSIS/k2
uXkvAYbrNCVYow9KpULQGhVUFwD2PnOGlrSZ1xUxUziv1V/A66jQmWnLcV8CwlJi
CISUeCTEjII7htTZOi3D/qIIweefct5hgevHYwNkTuKD8xOCCQY=
=scR2
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.