Suppose you have an XML file A.xml and need to load it into the Sedna database xml_db.
Sedna is to load XML into the database through Se_term. There are two ways of doing this:
1. Pass the-query parameter of the se_term.
Se_term-query "LOAD ' a.xml ' a '" xml_db
If A.xml is just one of a batch of XML, the tags are the same for this batch of XML files. You can consider using collections to save.
To create a collection:
Se_term-query "CREATE COLLECTION ' MyCol '" xml_db
and load the files into the collection.
Se_term-query "LOAD ' a.xml ' a ' mycol '" xml_db
2. Pass the-file parameter of the se_term.
First write the loaded statement to file A.query
LOAD "A.xml" "a"
Call it again to load the a.xml into the xml_db
Se_term-file A.query xml_db
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Sedna loading an XML file