Proximity provides the export-xml.sh shell script (export-xml.bat for Windows) for exporting data in Proximity databases to an XML format. You can export complete databases as well as selected database elements (attributes and containers).
Exercise 3.4 walks through the process of exporting the complete ProxWebKB database.
Exercise 3.4. Exporting a database to XML:
![]() |
|
|
The export process overwrites any existing data in the output file without warning. Make sure that output file is empty or can be safely overwritten. |
Change to the $PROX_HOME directory.
Export the database. (Substitute the appropriate port number if you are using a different port.)
> bin/export-xml.sh localhost:30000 \
$PROX_HOME/doc/user/tutorial/examples/my_proxwebkb.xml
Data files can only be exported to the same machine as that serving the database.
Proximity outputs the following trace (leading information showing elapsed time and execution thread has been omitted from the trace for brevity):
INFO app.ExportXMLApp: * exporting database to: /proximity/doc/user/tutorial/examples/my_proxwebkb.xml INFO app.ExportXMLApp: * saving objects INFO app.ExportXMLApp: * saving links INFO app.ExportXMLApp: * saving O attributes INFO app.ExportXMLApp: * saving attribute school INFO app.ExportXMLApp: * saving attribute url_server_info INFO app.ExportXMLApp: * saving attribute url_protocol INFO app.ExportXMLApp: * saving attribute url_hierarchy1 INFO app.ExportXMLApp: * saving attribute url_hierarchy2 INFO app.ExportXMLApp: * saving attribute url INFO app.ExportXMLApp: * saving attribute page_num_outlinks INFO app.ExportXMLApp: * saving attribute page_num_inlinks INFO app.ExportXMLApp: * saving attribute url_hierarchy1b INFO app.ExportXMLApp: * saving attribute page_words_top100 INFO app.ExportXMLApp: * saving attribute pagetype INFO app.ExportXMLApp: * saving attribute url_hierarchy3 INFO app.ExportXMLApp: * saving L attributes INFO app.ExportXMLApp: * saving attribute link_id INFO app.ExportXMLApp: * saving attribute link_tag INFO app.ExportXMLApp: * saving C attributes INFO app.ExportXMLApp: * done exporting