Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-12535

Add File source and other optional object in MVEL Parsing context for XML Parser

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.7.3-SNAPSHOT
    • Fix Version/s: 5.7.3
    • Component/s: Excel Export
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      Add source object exposing the source file or input stream parserd in mvel parsing context (for Advanced XML Parser). Can also add object into MVEL Context.

      Show
      Add source object exposing the source file or input stream parserd in mvel parsing context (for Advanced XML Parser). Can also add object into MVEL Context.

      Description

      Advanced XML Parser is now available in the importer repository and can be used by scan importer. This task aim to improve it.

      During the parsing you may need to import the file you are parsing into the document being created. So now the file is available into your mvel expression as source.

      If you give :

      • a File, to the service, source will be this File object
      • an InputStream, source will be this InputStream

      You can also give a map when you start importer that will be added into the mvel context:

         public List<DocumentModel> importDocuments(DocumentModel root, File source, Map<String, Object> mvelContext)
      

      And

         public List<DocumentModel> importDocuments(DocumentModel root, InputStream xmlStream, Map<String, Object> mvelContext)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: