npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bedrock-engineer/bro-xml-parser

v0.1.4

Published

Schema-driven parser for Dutch BRO (Basisregistratie Ondergrond) geotechnical XML data

Downloads

425

Readme

@bedrock-engineer/bro-xml

Parser for Dutch BRO (Basisregistratie Ondergrond) XML data, focussing on geotechnical and geological data.

Features

  • CPT (Cone Penetration Test) - 41 metadata fields + measurements
  • BHR-GT (Geotechnical Borehole) - soil layers + optional lab analysis
  • BHR-G (Geological Borehole) - NEN5104 soil classification

Zero dependencies in browser (uses native DOMParser). Full TypeScript support.

Installation

npm install @bedrock-engineer/bro-xml

# Node.js also requires:
npm install @xmldom/xmldom fontoxpath

Usage

// Browser
import { BROParser, XMLAdapter } from "@bedrock-engineer/bro-xml";

// Node.js
import { BROParser, XMLAdapter } from "@bedrock-engineer/bro-xml/node";

const parser = new BROParser(new XMLAdapter());

// Auto-detect file type
const data = parser.parse(xmlText);
console.log(data.meta.dataType); // 'CPT' | 'BHR-GT' | 'BHR-G'

// Or parse specific types
const cpt = parser.parseCPT(xmlText);
const bore = parser.parseBHRGT(xmlText); // BHR-GT
const bhrg = parser.parseBHRG(xmlText); // BHR-G

Custom Schemas

Extract only the fields you need:

import {
  BROParser,
  XMLAdapter,
  resolvers,
} from "@bedrock-engineer/bro-xml/node";

const parser = new BROParser(new XMLAdapter());

const mySchema = {
  id: { xpath: "brocom:broId" },
  depth: { xpath: ".//cptcommon:finalDepth", resolver: resolvers.parseFloat },
  location: {
    xpath: "./dscpt:deliveredLocation/cptcommon:location",
    resolver: resolvers.parseGMLLocation,
  },
};

const result = parser.parseCustom(xmlText, mySchema, "CPT");
// { id: "CPT000000099543", depth: 25.5, location: { x: 155000, y: 463000, epsg: "28992" } }

API

| Method | Returns | Description | | --------------------------------- | ----------- | -------------------------- | | parse(xml) | BROData | Auto-detect type and parse | | parseCPT(xml) | CPTData | Parse CPT file | | parseBHRGT(xml) | BHRGTData | Parse BHR-GT file | | parseBHRG(xml) | BHRGData | Parse BHR-G file | | parseCustom(xml, schema, type?) | T | Parse with custom schema |

See src/types/index.ts for full type definitions.

Supported Schemas

| Type | Schema Version | Link | | ------ | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | CPT | dscpt/1.1 | BRO CPT docs | | BHR-GT | dsbhr-gt/2.1 | BRO BHR-GT docs | | BHR-G | dsbhrg/3.1 | BRO BHR-G docs |

Reference Codes

Exported lookup tables for BRO domain codes (soil names, colors, procedures, etc.) are auto-generated from the BRO reference codes API. Run codegen:reference-codes to regenerate.

License

Apache 2.0 - Jules Blom at Bedrock.engineer