Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-09-2021 01:48 AM
I am facing a problem while importing xml file using apoc procedure.
CALL apoc.load.xml('bom.xml') | [also tried with whole file path and file:///bom.xml]
YIELD value
RETURN value
The error is:
Failed to invoke procedure apoc.load.xml
: Caused by: java.net.MalformedURLException: no protocol: bom.xml
I have also changed the apoc config in settings
apoc.import.file.enabled=true
apoc.import.file.use_neo4j_config=false
Can anyone please help me on this?
11-09-2021 01:54 AM
Please specify this in your settings-
apoc.import.file.enabled=true
apoc.export.file.enabled=true
11-09-2021 02:12 AM
Thank you Pawas.
I have changed the settings, but still the problem is there
11-09-2021 02:29 AM
apoc is not installed kindly do that
11-09-2021 02:37 AM
11-09-2021 03:35 AM
is the name of the XML file, BOM.xml or bom.xml as your examples above include both references.
Per Load XML - APOC Documentation
Import files are read from the import directory, which is defined by the dbms.directories.import property.
is the file in the import directory.
Also relative to the error no protocol: BOM.xml
I suspect this is because you need to specify file:///BOM.xml
, if in fact the name of the file is BOM.xml
11-09-2021 03:50 AM
The file name is BOM,(bom was my mistake).
I have tried CALL apoc.load.xml('file:///BOM.xml'), but its showing (The system cannot find the file specified)
11-09-2021 08:47 PM
call apoc.import.xml("file:///State_and_County_Report.XML")
YIELD node
RETURN node;
write the above code you're not writing the apoc code properly from writing this you will get it.
11-11-2021 08:01 AM
Thanks Pawas.
There was one error in config settings, that caused the error while loading xml.
Yea , and I got the graph using the 'apoc.import' .
11-14-2021 03:32 PM
might you elaborate on the misconfiguration so that we can improve the produce to better recognize and make the error more clearer
11-15-2021 08:05 AM
apoc.import.file.enabled=true.
I set it as 'false' by mistake. That was the reason for the error
All the sessions of the conference are now available online