我有这个 XML 文件,我正试图将其导入 mySQL。但是,使用 LOAD XML 查询不起作用,因为它们在变量名中是“-”。如何将其导入数据库并处理无效字符?:
<?xml version="1.0" encoding="UTF-8"?>
<projects type="array">
<project>
<active type="boolean">true</active>
<bill-by>none</bill-by>
<billable type="boolean">true</billable>
<budget type="decimal" nil="true"/>
<budget-by>none</budget-by>
<client-id type="integer">999</client-id>
<code></code>
<cost-budget type="decimal" nil="true"/>
<cost-budget-include-expenses type="boolean">false</cost-budget-include-expenses>
<created-at type="datetime">2013-06-27T18:10:26Z</created-at>
<fees type="decimal" nil="true"/>
<highrise-deal-id type="integer" nil="true"/>
<hourly-rate type="decimal" nil="true"/>
<id type="integer">38125</id>
<name>Banking</name>
<notify-when-over-budget type="boolean">false</notify-when-over-budget>
<over-budget-notification-percentage type="decimal">80.0</over-budget-notification-percentage>
<over-budget-notified-at type="date" nil="true"/>
<show-budget-to-all type="boolean">false</show-budget-to-all>
<updated-at type="datetime">2013-06-27T18:13:10Z</updated-at>
<estimate nil="true"/>
<estimate-by>none</estimate-by>
<notes></notes>
<hint-earliest-record-at type="NilClass">2013-06-24</hint-earliest-record-at>
<hint-latest-record-at type="NilClass">2013-06-30</hint-latest-record-at>
<hint-earliest-record-at>2013-06-24</hint-earliest-record-at>
<hint-latest-record-at>2013-06-30</hint-latest-record-at>
</project>