Parsers
parseLBL
Parses a PDS3 label into a PDSLabel. It accepts the bytes of a .LBL file, or of an .IMG file with an attached label. Parsing stops at END.
OBJECT and GROUP blocks become nested objects keyed by their name. If several blocks share a name (for example, several COLUMN objects), the last one wins.
See Supported formats for how each kind of value is parsed.
parseXML
Parses a PDS4 label. It uses the global DOMParser when available (browsers, happy-dom, jsdom). Otherwise it loads @xmldom/xmldom on demand.
Tip
Use getElementsByTagName instead of querySelector with PDS4 documents. Some DOM implementations do not reliably match element names that contain underscores, such as Array_2D_Image.