{"id":1177544,"date":"2025-01-15T17:59:17","date_gmt":"2025-01-15T09:59:17","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1177544.html"},"modified":"2025-01-15T17:59:20","modified_gmt":"2025-01-15T09:59:20","slug":"python%e5%a6%82%e4%bd%95%e6%8a%8axml%e6%94%b9%e4%b8%baexcel","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1177544.html","title":{"rendered":"python\u5982\u4f55\u628axml\u6539\u4e3aExcel"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25112435\/f55343e3-fe03-46db-9d92-3ceb51ca1e1c.webp\" alt=\"python\u5982\u4f55\u628axml\u6539\u4e3aExcel\" \/><\/p>\n<p><p> \u8981\u5c06XML\u6587\u4ef6\u8f6c\u6362\u4e3aExcel\u683c\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7f16\u5199\u811a\u672c\u5b9e\u73b0\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u5e93\u6765\u89e3\u6790XML\u6587\u4ef6\u548c\u64cd\u4f5cExcel\u6587\u4ef6\u3002<strong>\u5e38\u7528\u7684\u5e93\u5305\u62ec<code>xml.etree.ElementTree<\/code>\u7528\u4e8e\u89e3\u6790XML\uff0c<code>pandas<\/code>\u7528\u4e8e\u6570\u636e\u5904\u7406\uff0c\u4ee5\u53ca<code>openpyxl<\/code>\u7528\u4e8e\u64cd\u4f5cExcel\u6587\u4ef6\u3002<\/strong>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u8be6\u7ec6\u7684\u6307\u5357\uff0c\u5e26\u4f60\u4e00\u6b65\u4e00\u6b65\u5b9e\u73b0\u8fd9\u4e00\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u6240\u9700\u5e93<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86<code>pandas<\/code>\u548c<code>openpyxl<\/code>\u5e93\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pandas openpyxl<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u89e3\u6790XML\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u89e3\u6790XML\u6587\u4ef6\u9700\u8981\u7528\u5230<code>xml.etree.ElementTree<\/code>\u5e93\u3002\u8fd9\u4e2a\u5e93\u662fPython\u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\uff0c\u65e0\u9700\u989d\u5916\u5b89\u88c5\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u89e3\u6790\u4e00\u4e2aXML\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import xml.etree.ElementTree as ET<\/p>\n<p>def parse_xml(file_path):<\/p>\n<p>    tree = ET.parse(file_path)<\/p>\n<p>    root = tree.getroot()<\/p>\n<p>    return root<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5c06XML\u6570\u636e\u8f6c\u6362\u4e3aPandas DataFrame<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528<code>pandas<\/code>\u5e93\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06\u89e3\u6790\u540e\u7684XML\u6570\u636e\u8f6c\u6362\u4e3aDataFrame\u683c\u5f0f\uff0c\u4fbf\u4e8e\u540e\u7eed\u5904\u7406\u548c\u5199\u5165Excel\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>def xml_to_dataframe(root):<\/p>\n<p>    data = []<\/p>\n<p>    columns = [elem.tag for elem in root[0]]<\/p>\n<p>    for child in root:<\/p>\n<p>        row_data = [child.find(col).text if child.find(col) is not None else None for col in columns]<\/p>\n<p>        data.append(row_data)<\/p>\n<p>    df = pd.DataFrame(data, columns=columns)<\/p>\n<p>    return df<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5c06DataFrame\u5199\u5165Excel\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528<code>pandas<\/code>\u7684<code>to_excel<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5c06DataFrame\u5199\u5165Excel\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def save_to_excel(df, output_file):<\/p>\n<p>    df.to_excel(output_file, index=False, engine=&#39;openpyxl&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5b8c\u6574\u793a\u4f8b\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u5c06\u4ee5\u4e0a\u6b65\u9aa4\u6574\u5408\u5230\u4e00\u4e2a\u5b8c\u6574\u7684\u811a\u672c\u4e2d\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4eceXML\u6587\u4ef6\u5230Excel\u6587\u4ef6\u7684\u8f6c\u6362\u3002\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import xml.etree.ElementTree as ET<\/p>\n<p>import pandas as pd<\/p>\n<p>def parse_xml(file_path):<\/p>\n<p>    tree = ET.parse(file_path)<\/p>\n<p>    root = tree.getroot()<\/p>\n<p>    return root<\/p>\n<p>def xml_to_dataframe(root):<\/p>\n<p>    data = []<\/p>\n<p>    columns = [elem.tag for elem in root[0]]<\/p>\n<p>    for child in root:<\/p>\n<p>        row_data = [child.find(col).text if child.find(col) is not None else None for col in columns]<\/p>\n<p>        data.append(row_data)<\/p>\n<p>    df = pd.DataFrame(data, columns=columns)<\/p>\n<p>    return df<\/p>\n<p>def save_to_excel(df, output_file):<\/p>\n<p>    df.to_excel(output_file, index=False, engine=&#39;openpyxl&#39;)<\/p>\n<p>if __name__ == &quot;__m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n__&quot;:<\/p>\n<p>    xml_file_path = &#39;data.xml&#39;<\/p>\n<p>    excel_file_path = &#39;data.xlsx&#39;<\/p>\n<p>    root = parse_xml(xml_file_path)<\/p>\n<p>    df = xml_to_dataframe(root)<\/p>\n<p>    save_to_excel(df, excel_file_path)<\/p>\n<p>    print(f&quot;XML data has been successfully converted to {excel_file_path}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u8be6\u7ec6\u89e3\u91ca<\/h3>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u4e09\u4e2a\u4e3b\u8981\u7684\u51fd\u6570\uff1a<code>parse_xml<\/code>\u3001<code>xml_to_dataframe<\/code>\u548c<code>save_to_excel<\/code>\u3002\u6bcf\u4e2a\u51fd\u6570\u8d1f\u8d23\u4e00\u4e2a\u72ec\u7acb\u7684\u6b65\u9aa4\uff0c\u786e\u4fdd\u4ee3\u7801\u7ed3\u6784\u6e05\u6670\u4e14\u6613\u4e8e\u7ef4\u62a4\u3002<\/p>\n<\/p>\n<p><p><strong>1\u3001\u89e3\u6790XML\u6587\u4ef6<\/strong><\/p>\n<\/p>\n<p><p><code>parse_xml<\/code>\u51fd\u6570\u4f7f\u7528<code>xml.etree.ElementTree<\/code>\u5e93\u89e3\u6790XML\u6587\u4ef6\u3002<code>ET.parse<\/code>\u65b9\u6cd5\u8bfb\u53d6\u5e76\u89e3\u6790XML\u6587\u4ef6\uff0c\u8fd4\u56de\u4e00\u4e2a<code>ElementTree<\/code>\u5bf9\u8c61\u3002<code>getroot<\/code>\u65b9\u6cd5\u83b7\u53d6XML\u7684\u6839\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><p><strong>2\u3001\u5c06XML\u6570\u636e\u8f6c\u6362\u4e3aDataFrame<\/strong><\/p>\n<\/p>\n<p><p><code>xml_to_dataframe<\/code>\u51fd\u6570\u904d\u5386XML\u6839\u5143\u7d20\u7684\u5b50\u5143\u7d20\uff0c\u63d0\u53d6\u6bcf\u4e2a\u5b50\u5143\u7d20\u7684\u6807\u7b7e\u4f5c\u4e3a\u5217\u540d\u3002\u7136\u540e\uff0c\u904d\u5386\u6bcf\u4e2a\u5b50\u5143\u7d20\uff0c\u63d0\u53d6\u5176\u5b50\u6807\u7b7e\u7684\u6587\u672c\u5185\u5bb9\uff0c\u6784\u5efa\u884c\u6570\u636e\u3002\u6700\u540e\uff0c\u5c06\u6570\u636e\u8f6c\u6362\u4e3a<code>pandas<\/code> DataFrame\u3002<\/p>\n<\/p>\n<p><p><strong>3\u3001\u5c06DataFrame\u5199\u5165Excel\u6587\u4ef6<\/strong><\/p>\n<\/p>\n<p><p><code>save_to_excel<\/code>\u51fd\u6570\u4f7f\u7528<code>pandas<\/code>\u7684<code>to_excel<\/code>\u65b9\u6cd5\u5c06DataFrame\u5199\u5165Excel\u6587\u4ef6\u3002<code>index=False<\/code>\u53c2\u6570\u8868\u793a\u4e0d\u5199\u5165\u884c\u7d22\u5f15\uff0c<code>engine=&#39;openpyxl&#39;<\/code>\u53c2\u6570\u6307\u5b9a\u4f7f\u7528<code>openpyxl<\/code>\u5f15\u64ce\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u5904\u7406\u590d\u6742XML\u7ed3\u6784<\/h3>\n<\/p>\n<p><p>\u4e0a\u9762\u7684\u793a\u4f8b\u9002\u7528\u4e8e\u7b80\u5355\u7684XML\u7ed3\u6784\u3002\u5982\u679cXML\u7ed3\u6784\u66f4\u52a0\u590d\u6742\uff0c\u4f8b\u5982\u5d4c\u5957\u5143\u7d20\u6216\u5c5e\u6027\uff0c\u9700\u8981\u8fdb\u4e00\u6b65\u5904\u7406\u3002\u53ef\u4ee5\u901a\u8fc7\u9012\u5f52\u89e3\u6790\u5d4c\u5957\u5143\u7d20\uff0c\u6216\u8005\u4f7f\u7528<code>xmltodict<\/code>\u5e93\u5c06XML\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7136\u540e\u5904\u7406\u5b57\u5178\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import xmltodict<\/p>\n<p>def parse_complex_xml(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;, encoding=&#39;utf-8&#39;) as file:<\/p>\n<p>        xml_content = file.read()<\/p>\n<p>    xml_dict = xmltodict.parse(xml_content)<\/p>\n<p>    return xml_dict<\/p>\n<h2><strong>\u5904\u7406\u590d\u6742XML\u5b57\u5178\u6570\u636e\u7684\u903b\u8f91<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u5904\u7406\u7279\u6b8a\u6570\u636e\u7c7b\u578b<\/h3>\n<\/p>\n<p><p>\u5728\u8f6c\u6362\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u5904\u7406\u7279\u6b8a\u6570\u636e\u7c7b\u578b\u3002\u4f8b\u5982\uff0c\u65e5\u671f\u3001\u65f6\u95f4\u3001\u5e03\u5c14\u503c\u7b49\u3002\u53ef\u4ee5\u5728<code>xml_to_dataframe<\/code>\u51fd\u6570\u4e2d\u6dfb\u52a0\u76f8\u5e94\u7684\u5904\u7406\u903b\u8f91\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def xml_to_dataframe(root):<\/p>\n<p>    data = []<\/p>\n<p>    columns = [elem.tag for elem in root[0]]<\/p>\n<p>    for child in root:<\/p>\n<p>        row_data = []<\/p>\n<p>        for col in columns:<\/p>\n<p>            elem = child.find(col)<\/p>\n<p>            if elem is not None:<\/p>\n<p>                if col == &#39;date&#39;:  # \u793a\u4f8b\u5904\u7406\u65e5\u671f\u7c7b\u578b<\/p>\n<p>                    row_data.append(pd.to_datetime(elem.text))<\/p>\n<p>                elif col == &#39;is_active&#39;:  # \u793a\u4f8b\u5904\u7406\u5e03\u5c14\u7c7b\u578b<\/p>\n<p>                    row_data.append(elem.text.lower() == &#39;true&#39;)<\/p>\n<p>                else:<\/p>\n<p>                    row_data.append(elem.text)<\/p>\n<p>            else:<\/p>\n<p>                row_data.append(None)<\/p>\n<p>        data.append(row_data)<\/p>\n<p>    df = pd.DataFrame(data, columns=columns)<\/p>\n<p>    return df<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u6269\u5c55\u6027\u548c\u9c81\u68d2\u6027<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u6269\u5c55\u6027\u548c\u9c81\u68d2\u6027\uff0c\u53ef\u4ee5\u6dfb\u52a0\u5f02\u5e38\u5904\u7406\u3001\u65e5\u5fd7\u8bb0\u5f55\u548c\u914d\u7f6e\u6587\u4ef6\u652f\u6301\u3002\u4f8b\u5982\uff0c\u6dfb\u52a0\u5f02\u5e38\u5904\u7406\u4ee5\u6355\u83b7\u548c\u5904\u7406\u53ef\u80fd\u53d1\u751f\u7684\u9519\u8bef\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import logging<\/p>\n<p>def parse_xml(file_path):<\/p>\n<p>    try:<\/p>\n<p>        tree = ET.parse(file_path)<\/p>\n<p>        root = tree.getroot()<\/p>\n<p>        return root<\/p>\n<p>    except ET.ParseError as e:<\/p>\n<p>        logging.error(f&quot;Error parsing XML file: {e}&quot;)<\/p>\n<p>        return None<\/p>\n<p>def save_to_excel(df, output_file):<\/p>\n<p>    try:<\/p>\n<p>        df.to_excel(output_file, index=False, engine=&#39;openpyxl&#39;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        logging.error(f&quot;Error saving Excel file: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u5341\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u5b8c\u6210\u4e86\u4eceXML\u6587\u4ef6\u5230Excel\u6587\u4ef6\u7684\u8f6c\u6362\u3002<\/strong>\u8fd9\u4e2a\u8fc7\u7a0b\u5305\u62ec\u89e3\u6790XML\u6587\u4ef6\u3001\u5c06XML\u6570\u636e\u8f6c\u6362\u4e3aPandas DataFrame\uff0c\u5e76\u5c06DataFrame\u5199\u5165Excel\u6587\u4ef6\u3002<strong>\u6839\u636eXML\u7ed3\u6784\u7684\u590d\u6742\u7a0b\u5ea6\uff0c\u53ef\u4ee5\u8c03\u6574\u548c\u6269\u5c55\u4ee3\u7801\uff0c\u4ee5\u5904\u7406\u5d4c\u5957\u5143\u7d20\u3001\u5c5e\u6027\u548c\u7279\u6b8a\u6570\u636e\u7c7b\u578b\u3002<\/strong>\u6b64\u5916\uff0c\u901a\u8fc7\u6dfb\u52a0\u5f02\u5e38\u5904\u7406\u3001\u65e5\u5fd7\u8bb0\u5f55\u548c\u914d\u7f6e\u6587\u4ef6\u652f\u6301\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u6269\u5c55\u6027\u548c\u9c81\u68d2\u6027\u3002<strong>\u5e0c\u671b\u8fd9\u4e2a\u8be6\u7ec6\u6307\u5357\u80fd\u591f\u5e2e\u52a9\u4f60\u5b9e\u73b0XML\u5230Excel\u7684\u8f6c\u6362\uff0c\u5e76\u4e3a\u4f60\u7684\u6570\u636e\u5904\u7406\u5de5\u4f5c\u63d0\u4f9b\u4fbf\u5229\u3002<\/strong><\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06XML\u6587\u4ef6\u8f6c\u6362\u4e3aExcel\u683c\u5f0f\uff1f<\/strong><br \/>\u5c06XML\u6587\u4ef6\u8f6c\u6362\u4e3aExcel\u683c\u5f0f\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\u3002\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u4f7f\u7528Python\u7684pandas\u5e93\u3002\u9996\u5148\uff0c\u9700\u8981\u4f7f\u7528<code>pandas<\/code>\u7684<code>read_xml<\/code>\u51fd\u6570\u8bfb\u53d6XML\u6570\u636e\uff0c\u7136\u540e\u4f7f\u7528<code>to_excel<\/code>\u51fd\u6570\u5c06\u5176\u4fdd\u5b58\u4e3aExcel\u6587\u4ef6\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u9ad8\u6548\uff0c\u9002\u5408\u5904\u7406\u7ed3\u6784\u5316\u6570\u636e\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5904\u7406XML\u6587\u4ef6\u9700\u8981\u54ea\u4e9b\u5e93\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5904\u7406XML\u6587\u4ef6\u901a\u5e38\u9700\u8981\u7528\u5230<code>pandas<\/code>\u548c<code>xml.etree.ElementTree<\/code>\u5e93\u3002<code>pandas<\/code>\u5e93\u7528\u4e8e\u6570\u636e\u5904\u7406\u548c\u8f6c\u6362\uff0c\u800c<code>xml.etree.ElementTree<\/code>\u5219\u7528\u4e8e\u89e3\u6790XML\u5185\u5bb9\u3002\u901a\u8fc7\u7ed3\u5408\u8fd9\u4e24\u4e2a\u5e93\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u8bfb\u53d6\u3001\u4fee\u6539\u548c\u4fdd\u5b58\u6570\u636e\u3002<\/p>\n<p><strong>\u8f6c\u6362XML\u4e3aExcel\u65f6\uff0c\u5982\u4f55\u5904\u7406\u590d\u6742\u7684XML\u7ed3\u6784\uff1f<\/strong><br \/>\u5bf9\u4e8e\u590d\u6742\u7684XML\u7ed3\u6784\uff0c\u53ef\u4ee5\u5148\u89e3\u6790XML\u6587\u4ef6\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u9002\u5408\u8868\u683c\u683c\u5f0f\u7684\u6570\u636e\u7ed3\u6784\uff0c\u4f8b\u5982\u5b57\u5178\u6216\u5217\u8868\u3002\u901a\u8fc7\u904d\u5386XML\u8282\u70b9\uff0c\u53ef\u4ee5\u63d0\u53d6\u6240\u9700\u7684\u4fe1\u606f\u5e76\u6784\u5efa\u4e00\u4e2a<code>DataFrame<\/code>\u3002\u968f\u540e\uff0c\u518d\u5c06\u8fd9\u4e2a<code>DataFrame<\/code>\u4f7f\u7528<code>to_excel<\/code>\u65b9\u6cd5\u4fdd\u5b58\u4e3aExcel\u6587\u4ef6\u3002\u6b64\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u6570\u636e\u6e05\u7406\u548c\u683c\u5f0f\u8c03\u6574\uff0c\u4ee5\u786e\u4fdd\u6700\u7ec8\u7684Excel\u6587\u4ef6\u7b26\u5408\u9884\u671f\u7684\u683c\u5f0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5c06XML\u6587\u4ef6\u8f6c\u6362\u4e3aExcel\u683c\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7f16\u5199\u811a\u672c\u5b9e\u73b0\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u5e93\u6765\u89e3\u6790XML\u6587\u4ef6 [&hellip;]","protected":false},"author":3,"featured_media":1177549,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1177544"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1177544"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1177544\/revisions"}],"predecessor-version":[{"id":1177554,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1177544\/revisions\/1177554"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1177549"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1177544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1177544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1177544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}