Nodeflip Documentation

Explore the features and functionalities of Nodeflip.

Data Extractor

This tool allows extracting specific data points from multiple XML/JSON/ZIP files simultaneously using XPath queries.

Data Extractor

Workflow Overview

  1. Select Files: Choose the uploaded files or ZIP archives you want to extract data from.
  2. Enter XPath Query: Define the XPath expression to locate the data you want to extract.
  3. Extract Values: Run the extraction process to gather matching data from all selected files.
  4. Review Results: View the extracted data in a table format with file names and corresponding values.
  5. (Optional) Export Results: Copy values to clipboard or download as CSV for further use.

Features

File Input

  • Uploaded Files: All the uploaded files are selectable in the "Select Files" card.
  • Uploaded ZIP Archives: The extractor will automatically find and process JSON or XML files within the uploaded ZIP archive, no manual extraction necessary.

XPath Query

  • Query Input: An XPath query can be entered in the XPath Query text field.
  • Standard XPath: Supports standard XPath 1.0 syntax for navigating the JSON/XML structure and selecting nodes or attribute values (e.g., //element/@attribute, /root/path/to/value). These can be copied from the Tree View, see Tree View documentation.
  • Concatenation Syntax: Supports a special syntax to concatenate multiple values from the same file using a specified delimiter (e.g., a comma):

    /path/to/element1 & 'delimiter' & /path/to/element2
    
    • This will find element1 and element2 within each file and output value1 delimiter value2 as a single extracted value.
  • Namespace Handling: Attempts to handle XML namespaces automatically, including default namespaces and using local-name() for namespace-agnostic matching when standard methods fail.
  • Clear Query Button (X): An icon button appears in the input field to clear the current query.

Extraction Process

  • Extract Values Button: Triggers the extraction process using the selected input source and the provided XPath query.
  • Error Handling: If an error occurs (e.g., XPath does not resolve to any elements) an error message will be displayed.

Results Display

  • Results Table: Displays the extracted data with two columns:

    • File Name: The name of the source file (including ZIP archive name and path within the ZIP, if applicable).
    • Extracted Value: The data extracted from that file based on the XPath query.
  • Multiple Matches: If an XPath query matches multiple nodes within a single file, each match will be listed as a separate row in the results table with the same file name.

Results Actions

Above the results table, several actions are available:

  • Copy Values: Copies only the text from the "Extracted Value" column to the clipboard, with each value on a new line.
  • Download as CSV: Downloads the complete results table (both "File Name" and "Extracted Value" columns) as a comma-separated values (.csv) file. Values containing commas or quotes are appropriately escaped.
  • Clear All: Clears the current XPath query, the results table, the list of uploaded ZIP files, and any error messages.

Persistence

  • The last entered XPath query and the last set of extraction results are automatically saved in your browser.
  • When revisiting the Data Extractor section, previous results are displayed along with an informational message. Uploading new files or running a new extraction will replace these previous results.