0.15.1 • Published 1 year ago

lassy-xpath v0.15.1

Weekly downloads
6
License
-
Repository
-
Last release
1 year ago

Build Status npm version

LASSY XPath

Module for working with XPath queries on LASSY XML files. It includes a graphical editor including auto completion, macros and validation based on Ace, a parser and validator based on ts-xpath and an "extractinator" for determining XPaths to get each node from the returned tree separately. It also has a "reconstructor" to create an XML structure representing the query tree. The functionality can be used as an Angular module.

Compatibility

  • v0.15.x is for Angular 15
  • v0.12.x is for Angular 12
  • v0.4.3 and down should work with Angular 6 and JQuery

Angular

npm install lassy-xpath

Import the module:

import { LassyXPathModule } from 'lassy-xpath';

@NgModule({
    imports: [LassyXPathModule]
})
export class AppModule {}

Includes the services:

import { MacroService, ExtractinatorService, ValueEvent } from 'lassy-xpath';


@Component()
export class ExampleComponent {
    constructor(
        macroService: MacroService,
        private extractinatorService: ExtractinatorService) {
        // set the macros to use in the editor
        macroService.loadDefault();
    }

    inputChanged(event: ValueEvent) {
        this.valid = !event.error;
        this.value = event.xpath;
        console.log(this.extractinatorService.extract(event.xpath));
    }
}

Embeds an editor:

<lx-editor [value]="value" (onChange)="inputChanged($event)" autofocus="true"></lx-editor>

Use the ParserService for parsing/validating a LASSY XML XPath.

Publishing a new version

Run npm run publish from root or follow these steps:

  1. Compile using npm run build
  2. cd dist/lassy-xpath
  3. Optionally run npm pack to test the package locally
  4. Remove the lassy-xpath-x.xx.x.tgz file (if generated in 3)
  5. Run npm publish
0.12.1

1 year ago

0.15.0

1 year ago

0.15.1

1 year ago

0.12.0

3 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.0

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago