Mao (xml) test multiplication (2): pl/SQL method, xmlpl

Source: Internet
Author: User

Mao (xml) test multiplication (2): pl/SQL method, xmlpl

Oracle supports xml. You can use pl/SQL to process xml data.

The following example uses dbms_output for xml processing.

Similarly, you can Insert the result into the table.


Declarex xmltype: = xmltype ('<? Xml version = "1.0"?> <Config> <! -- There is a lot of data between config and rules, which is simplified here --> <devices> <entry> <vsys> <entry> <rulebase> <security> <rules> <! -- There are hundreds of entries under rules, which are simplified here, leave only one piece of data --> <entry name = "GlobalProtect"> <from> <member> untrust-1 </member> <member> untrust-2 </member> </from> <> <member> dmz1 </member> <member> dmz2 </member> </to> <source> <member> any </member> </source> <destination> <member> DC01_FW01_eth11 </member> </destination> <source-user> <member> any </member> </source-user> <category> <member> any </member> </category> <application> <member> any </member> </application> <service> <member> service_https </member> <member> TCP_80 </member> </service> 


Output result

GlobalProtect,untrust-1;untrust-2,dmz1;dmz2,any,DC01_FW01_eth11,any,any,any,service_https;TCP_80,any,test,traffic_log

Note: In the red part, ";" is the internal Separator of nodes with multiple values, while "," is the delimiter between nodes.

Related Article

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.