【发布时间】:2013-02-14 06:32:36
【问题描述】:
我收到了一个“xml”文件,但它看起来并不像 XML。我知道它是从 Microsoft Access 或 SQLServer 导出的。该文件如下所示:
>>> contents[:1000]
'\xef\xbb\xbf<?xml version="1.0"?><Report xmlns="Ascent_x0_Metadata_x0020_Report_x0020__x002ted"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="Ascent_x0020_Me0_Repo29__x0020_updated http://reportserver?
%2fAsata+Report+(by+Title+Letter)+updated&rs%3aFormat=XML&rc%3aSchema=True"
Name="Ascent Report (by Title Letter) updated">
<table1>
<Detail_Collection>
<Detail ISOCountry="AR" TitleSort="A Very Brady Sequel"
ReleaseYear="1996" TitleKind="N/A" TitleType="N/A"...
此外,我什至无法在TextMate 中打开这个文件——每次我尝试打开它都会使程序崩溃。
【问题讨论】:
-
\xef\xbb\xbf 是。我不知道这是否有帮助,但就是这样。在我看来,它确实像 XML。只是在前几个字节中有一些垃圾?
标签: python sql-server xml ms-access xml-parsing