Structured data boundaries
Keep the source shape. Choose the application shape.
JSON, delimited text, BSON, and XML describe data differently. loaders.gl keeps those input boundaries explicit while letting applications choose documents, tables, features, or trees for the next stage.
Input families
Common API boundary
load · parse · write
Application results
A readable interchange format can stay readable at the edge, or become a typed table when that is what the application needs.
The document parsing path
Read XML tokens. Let the format loader interpret them.
XML is a syntax layer shared by formats such as KML and other document types. This module handles that layer so higher-level loaders can focus on their own data models.
Input
XML or HTML text and binary resources
Parsing
Token and document structure
Consumers
KML, metadata, and application loaders
Output
Format-specific JavaScript data
Detailed guide
Parser and format details
The reference below covers XML handling, HTML support, installation, parser behavior, and attribution.
The @loaders.gl/documents module handles the eXtensible Markup Language format.
APIs
XMLLoaderparses XML into JavaScript values.HTMLLoaderhandles HTML input.parseXMLSyncprovides direct synchronous XML parsing.SAXParserexposes the underlying event-based parser.
The module parses document structure. Protocol-specific interpretation belongs to loaders such as KML and WMS. See the XML format page.
Installation
npm install @loaders.gl/documents
npm install @loaders.gl/core
Attribution
This module contains a fork of sax-ts, which is in turn is a TypeScript fork of Isaac Schlueter's sax-js, both licensed under the MIT-compatible ISC license.
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Sources and credits
See the package source and license inventory and the project-wide Attributions and Credits.