Socket
Socket
Sign inDemoInstall

xmllint-extra

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xmllint-extra

Decorate xmllint error messages with extra information (tag name and offset)


Version published
Weekly downloads
2
Maintainers
1
Install size
4.55 MB
Created
Weekly downloads
 

Readme

Source

xmllint-extra

Decorate xmllint error messages with extra information (tag name and offset).

This wrapper also adds some heuristics to fix imports between the passed schemas, by recognizing their defined namespace.

example

When parsing with direct xmllint you could get:

{ errors:
  [
    "file_0.xml:2: element FatturaElettronica: Schemas validity error : Element '{http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2}FatturaElettronica', attribute 'versione': [facet 'enumeration'] The value '1.1' is not an element of the set {'FPA12', 'FPR12'}.",
    "file_0.xml:10: element FormatoTrasmissione: Schemas validity error : Element 'FormatoTrasmissione': [facet 'enumeration'] The value 'SDI11' is not an element of the set {'FPA12', 'FPR12'}.",
    "file_0.xml:10: element FormatoTrasmissione: Schemas validity error : Element 'FormatoTrasmissione': 'SDI11' is not a valid value of the atomic type '{http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2}FormatoTrasmissioneType'.",
    "file_0.xml:101: element PrezzoUnitario: Schemas validity error : Element 'PrezzoUnitario': '2459.020a' is not a valid value of the atomic type '{http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2}Amount8DecimalType'."
  ]
}

using this package that will be converted to:

{ errors:
  [
    { message: "Element '{http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2}FatturaElettronica', attribute 'versione': [facet enumeration'] The value '1.1' is not an element of the set {'FPA12', 'FPR12'}.",
      offset: 39,
      element: 'FatturaElettronica',
      context: '<ns3:FatturaElettronica xmlns:ns3="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2" mlns:ns2="http://www.w3.org/2000/09/xmldsig#" versione="1.1">' },
    { message: "Element 'FormatoTrasmissione': [facet 'enumeration'] The value 'SDI11' is not an element of the set {'FPA12', 'FPR12'}.",
      offset: 425,
      element: 'FormatoTrasmissione',
      context: '<FormatoTrasmissione>SDI11</FormatoTrasmissione>' },
    { message: "Element 'FormatoTrasmissione': 'SDI11' is not a valid value of the atomic type 'http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2}FormatoTrasmissioneType'.",
      offset: 425,
      element: 'FormatoTrasmissione',
      context: '<FormatoTrasmissione>SDI11</FormatoTrasmissione>' },
    { message: "Element 'PrezzoUnitario': '2459.020a' is not a valid value of the atomic type 'http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2}Amount8DecimalType'.",
      offset: 3760,
      element: 'PrezzoUnitario',
      context: '<PrezzoUnitario>2459.020a</PrezzoUnitario>' }
  ]
}

Keywords

FAQs

Last updated on 21 Mar 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc