【问题标题】:XML to Markdown format conversionXML 到 Markdown 格式的转换
【发布时间】:2020-03-15 04:09:51
【问题描述】:

如果可能,我需要通过 Pandoc 或其他方式将 XML 格式文件转换为 Markdown。 根据一些建议,我尝试先将其转换为 LaTeX 格式,然后再转换为 Markdown。转换后我在 Markdown 文件中得到的只是 ---------(破折号)。

要转换的XML文档的原始内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<config>
<!--defining variable-->
<var-def name="http_response">
<!--passing the appropriate value from url_to_check column in input data file as a parameter for http plugin-->
<http url = "${url_to_check}"></http>
</var-def>
<!--exporting all original input columns-->
<export include-original-data="true">
<!--adding a new column with the http plugin result to the export file-->
<single-column name="http" value= "${http_response }"/>
</export>
</config>

你有什么想法吗?提前感谢您的帮助。

【问题讨论】:

标签: xml pandoc


【解决方案1】:

将 XML 内容放在两组 ``` 之间——一组在 XML 文本之前,另一组在它之后

```
<?xml version="1.0" encoding="UTF-8"?>
<config>
<!--defining variable-->
<var-def name="http_response">
<!--passing the appropriate value from url_to_check column in input data file as a parameter for http plugin-->
<http url = "${url_to_check}"></http>
</var-def>
<!--exporting all original input columns-->
<export include-original-data="true">
<!--adding a new column with the http plugin result to the export file-->
<single-column name="http" value= "${http_response }"/>
</export>
</config>
```

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-30
    • 2020-07-14
    • 1970-01-01
    • 2022-07-15
    • 2010-11-14
    相关资源
    最近更新 更多