Apoc.util.compress from a file instead of a large xml string

using this mechanism ( apoc.util.compress - APOC Extended Documentation (neo4j.com)) works great for us. Other xml to graphs don't seem to work very well..

WITH apoc.util.compress('<?xml version="1.0" encoding="utf-8"?>

<?xml-stylesheet type="text/xsl" href="..\transforms\pp2html.xsl"?> <?xml-model href="https://raw.githubusercontent.com/commoncriteria/transforms/master/schemas/CCProtectionProfile.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>

But requires us to pass in the very large XML file as a String.. Cant we instead pass in a file path? our xml files are, pretty large ...

Thanks Guys..

Since you're working with XML data, the apoc.load.xml and apoc.xml.parse procedures can load XML from a file, however they will parse and transform the XML into a map/dictionary/object strucutre. Not sure what your usecase is but you could use apoc.xml.parse to load the XML file and then pass the result to apoc.util.compress.

thanks.. I will dig into these again.. I didn't see how to do the connection between these mechanisms.. Basically we have these xml files, which don't seem to be in a standard format (yuck) and we want to understand them, so I proposed using a neo4j graphs to at least visualize them. the non-standard format is what makes this hard as a non-programmer/non graph person would have to manually build all those "with" statements..