zoukankan      html  css  js  c++  java
  • MySQL获取XML格式数据

    通过再调用mysql工具时使用--xml选项:

    C:Userswang>mysql -uroot -p --xml mydb
    Enter password: ********
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 26
    Server version: 5.7.21-log MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    mysql> SELECT * FROM favorite_food;
    <?xml version="1.0"?>
    
    <resultset statement="SELECT * FROM favorite_food;" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <row>
            <field name="person_id">1</field>
            <field name="food">apple</field>
      </row>
    
      <row>
            <field name="person_id">1</field>
            <field name="food">banana</field>
      </row>
    
      <row>
            <field name="person_id">1</field>
            <field name="food">orange</field>
      </row>
    </resultset>
    3 rows in set (0.00 sec)
    
  • 相关阅读:
    微信开发:MySQL utf8mb4 字符集
    Spring 事务
    Exception
    mysql系列之多实例介绍
    python连接MySQL
    1_archlinux_安装篇
    apache中如何调用CGI脚本
    1.1_Django简介及安装
    git分支合并脚本
    用python收集系统信息
  • 原文地址:https://www.cnblogs.com/zifeiy/p/8780865.html
Copyright © 2011-2022 走看看