1

I'm using the latest version of phive (v11.x) to validate PEPPOL UBL 2.1 invoices.

I execute the validation and get a ValidationResultList, however, for all errors error.getErrorLocation().getLineNumber() always returns -1

How can I get the ValidationResultList to provide actual line numbers for errors when validating PEPPOL UBL XML files using phive?

I've created the IValidationSourceXML like this:

final IValidationSourceXML validationSourceXML = ValidationSourceXML.create(
    "memory://invoice.xml", DOMReader.readXMLDOM(xmlContent)
);

I've also tried using:


IReadableResource res = new ReadableResourceString(xmlContent, StandardCharsets.UTF_8);
ValidationSourceXML.create(res);

…but the lineNumber is still -1.

1
  • please file those questions at github.com/phax/phive - I don't have the capacity to monitor everything all the time. The problem is, that you pass in a ready parsed DOM document. Try passing in the resource instead, so that a relationship to the source file can be created Commented Nov 15 at 20:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.