Small donkey (XML) test ride (b): PL/SQL method

Source: Internet
Author: User

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> &lt ;! 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 results

Globalprotect,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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.