Oracle supports XML. XML data can be processed in PL/SQL.
The following example outputs the XML after it is processed with Dbms_output.
Similarly, you can insert the results into the table.
Declarex XmlType: = XmlType (' <?xml version= ' 1.0 '?><config> <!--There's a lot of data between Config and rules, and here it's simplified--< devices> <entry> <vsys> <entry> <rulebase> <security> <rules> < ;! There are hundreds of entry under--rules, simplified here, leaving only 1 data--<entry name= "Globalprotect" > <from><member>untrust-1</ Member><member>untrust-2</member> </from> <to><member>dmz1</member>< member>dmz2</member> </to> <source><member>any</member> </source> <desti Nation><member>dc01_fw01_eth11</member> </destination> <source-user><member>any </member> </source-user> <category><member>any</member> </category> <applic Ation><member>any</member> </application> <service><member>service_https</ Member><member>tcp_80</member> </service>
Output resultsGlobalprotect,untrust-1;untrust-2,dmz1;dmz2, Any,dc01_fw01_eth11,any,any,any,Service_ Https Tcp_80, Any,test,traffic_log
Note: The Scarlet Letter section, ";" is the delimiter inside node with multiple values, and "," is the delimiter between each node.
Small donkey (XML) test ride (b): PL/SQL method