@nodable/flexible-xml-parser
Advanced tools
+4
-0
| **1.3.0 (2026-06-16)** | ||
| - support `skip.whitespaceText` | ||
| - update base output builder for typings | ||
| **1.2.2 (2026-06-02)** | ||
@@ -3,0 +7,0 @@ - fix: cjs typings |
+6
-0
@@ -82,2 +82,8 @@ /** | ||
| tags?: Array<string | SkipTagEntry>; | ||
| /** | ||
| * Skip whitespace only text values to be passed to the builder | ||
| * | ||
| * @default true | ||
| */ | ||
| whitespaceText?: boolean; | ||
| } | ||
@@ -84,0 +90,0 @@ |
+2
-2
| { | ||
| "name": "@nodable/flexible-xml-parser", | ||
| "version": "1.2.2", | ||
| "version": "1.3.0", | ||
| "description": "Fastest and fully customizable XML parser in pure JS with fully customizable ouput", | ||
@@ -49,3 +49,3 @@ "main": "./lib/fxp.cjs", | ||
| "dependencies": { | ||
| "@nodable/base-output-builder": "^1.0.6", | ||
| "@nodable/base-output-builder": "^1.0.7", | ||
| "@nodable/compact-builder": "^1.0.9", | ||
@@ -52,0 +52,0 @@ "path-expression-matcher": "^1.5.0", |
+6
-0
@@ -81,2 +81,8 @@ import { BaseOutputBuilderFactory } from "@nodable/base-output-builder" | ||
| tags?: Array<string | SkipTagEntry>; | ||
| /** | ||
| * Skip whitespace only text values to be passed to the builder | ||
| * | ||
| * @default true | ||
| */ | ||
| whitespaceText?: boolean; | ||
| } | ||
@@ -83,0 +89,0 @@ |
@@ -24,2 +24,3 @@ import { CompactBuilderFactory } from '@nodable/compact-builder'; | ||
| tags: [], // Tag paths to skip entirely — content is silently dropped from output | ||
| whitespaceText: true // addValue() of a builder would not be called if text is only whitespaces | ||
| }, | ||
@@ -26,0 +27,0 @@ |
@@ -470,4 +470,4 @@ import StringSource from './InputSource/StringSource.js'; | ||
| if (this.tagTextData !== undefined && this.tagTextData !== "") { | ||
| if (this.tagTextData.trim().length > 0) { | ||
| // Pass raw text — entity expansion is handled by 'entities' ValueParser in the chain | ||
| // Pass raw text — entity expansion is handled by 'entities' ValueParser in the chain | ||
| if (!this.options.skip.whitespaceText || this.tagTextData.trim().length > 0) { | ||
| this.outputBuilder.addValue(this.tagTextData, this.readonlyMatcher); | ||
@@ -474,0 +474,0 @@ } |
Sorry, the diff of this file is too big to display
274353
0.2%4209
0.17%+ Added
+ Added
- Removed
- Removed