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

@partnersync/promapp-xml-parsers

v0.3.0

Published

TypeScript parsers for Nintex Process Manager (Promapp) XML exports

Readme

Promapp XML Parsers

TypeScript-based parsers for extracting and processing structured data from Nintex Process Manager (Promapp) XML exports. The toolkit provides comprehensive parsing and formatting capabilities for Promapp XML files.

🎯 Overview

This repository contains three specialized components:

  1. Core Structure Parser - Extracts hierarchical organization, metadata, and process relationships
  2. Text Content Parser - Processes activity text and attachments with |~| delimiter support
  3. Activity Content Formatter - Transforms parsed content into formatted output with multiple renderers

Together, they provide comprehensive parsing and formatting of Promapp XML exports.

📦 Installation

npm install @partnersync/promapp-xml-parsers

Or clone and build locally:

git clone [email protected]:PartnerSync/promapp-xml-parsers.git
cd promapp-xml-parsers
npm install
npm run build

🚀 Usage

Core Structure Parser

Extracts the hierarchical structure and metadata from Promapp exports:

# Display hierarchical tree structure
npx promapp-parse-structure "Test Group.xml"

# Output as JSON
npx promapp-parse-structure "Test Group.xml" --json

Output includes:

  • Process hierarchy with groups and subgroups
  • Process metadata (ownership, state, version)
  • Export configuration detection
  • Activity counts

Text Content Parser

Parses the detailed text content within activities:

# Parse and display formatted text
npx promapp-parse-text "Test Group.xml"

# Output as JSON with parsed structure
npx promapp-parse-text "Test Group.xml" --json

# Parse individual ProcessProcedures fragment
npx promapp-parse-text --procedures procedures.xml

Features:

  • Parses |~| delimited text into structured arrays
  • Handles nested bullets, numbering, and indentation
  • Preserves formatting including non-breaking spaces
  • Supports Tasks, Notes, Forms, and WebLinks

Activity Content Formatter

Formats parsed content with intelligent structuring and multiple output options:

# Parse and format with different renderers
npx ts-node examples/parse-xml-file.ts "Test Group.xml"                    # Text output (default)
npx ts-node examples/parse-xml-file.ts "Test Group.xml" --format markdown  # Markdown output
npx ts-node examples/parse-xml-file.ts "Test Group.xml" --format html      # HTML output
npx ts-node examples/parse-xml-file.ts "Test Group.xml" --format json      # JSON output

Features:

  • Contextual note embedding
  • Automatic number cleaning (e.g., 1.0.11.1)
  • List detection and formatting
  • Depth management with configurable limits
  • Multiple output formats

Programmatic Usage

import {
    PromappCoreStructureParser,
    PromappTextContentParser,
    formatActivityContent,
    renderAsText,
    renderAsMarkdown,
    renderAsHtml,
    renderAsJson
} from '@partnersync/promapp-xml-parsers';
import { JSDOM } from 'jsdom';

// Parse structure
const structureParser = new PromappCoreStructureParser();
const structure = structureParser.parse(xmlDocument);

// Parse text content
const textParser = new PromappTextContentParser();
const content = textParser.parse(processProceduresElement);

// Format and render
const formatted = formatActivityContent(content.activities);
const text = renderAsText(formatted);
const markdown = renderAsMarkdown(formatted);
const html = renderAsHtml(formatted);
const json = renderAsJson(formatted);

🛠 Architecture

Component Separation

The three components work together but maintain clear separation:

  • Core Structure Parser: Focuses on XML hierarchy, counts, and metadata
  • Text Content Parser: Handles the complex text formatting within activities
  • Activity Content Formatter: Transforms parsed content into display-ready formats

This separation allows for:

  • Clean, focused code
  • Independent testing and maintenance
  • Flexible integration options
  • Multiple output formats

Key Design Principles

  1. Modular architecture - Separate parsing, formatting, and rendering
  2. Type safety - Full TypeScript with strict typing and discriminated unions
  3. Const assertion patterns - For type-safe enums
  4. Graceful degradation - Handle missing elements safely
  5. Format once, render many - Efficient formatting with multiple outputs

📋 Features

Supported XML Structures

  • Simple: Direct processes under root group
  • Complex: Nested groups with process/group links
  • Variable: Handles different export configurations

Export Types Detected

  • Stub - Structure only, no content
  • OneLevel - Single level with content
  • Full - Complete recursive export

Text Formatting Support

  • Line breaks via |~| delimiters
  • Bullets: -, *,
  • Numbering: 1., 1.1, 2.
  • Indentation preservation
  • Non-breaking space handling

Output Formats

  • Text: Clean, indented text output
  • Markdown: GitHub-flavored markdown
  • HTML: Semantic HTML with CSS classes
  • JSON: Structured data format

🧪 Testing

Run tests for all components:

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run with coverage
npm run test:coverage

🔗 Combined Usage

For complete XML processing, see the examples directory:

# Parse and display in different formats
npx ts-node examples/parse-xml-file.ts "Test Group.xml" --format text
npx ts-node examples/parse-xml-file.ts "Test Group.xml" --format markdown

# Run the combined parser example
npx ts-node examples/combined-parser.ts "Test Group.xml"

This provides:

  • Hierarchical process group structure
  • Process metadata (ownership, state, version)
  • Detailed activity content with formatted text
  • Multiple output format options

The complete pipeline:

  1. Uses the core structure parser to build the hierarchy
  2. Applies the text parser to extract content
  3. Formats the content with the activity formatter
  4. Renders in the desired output format

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure all tests pass and follow the established patterns for new components.

📄 License

MIT - see LICENSE for details.

🙏 Acknowledgments

Built for parsing Nintex Process Manager (Promapp) XML exports. Nintex and Promapp are trademarks of Nintex Ltd.