How can i include a text document in an XML file?

5 ビュー (過去 30 日間)
Chaitra
Chaitra 2014 年 7 月 3 日
編集済み: Dhanyatha 2014 年 7 月 3 日
I print out the output of ver command to a text file 'ver.txt'. I want to include a link to this file in an xml file that i am creating via MATLAB. How can i do this?

回答 (1 件)

Dhanyatha
Dhanyatha 2014 年 7 月 3 日
編集済み: Dhanyatha 2014 年 7 月 3 日
You can include a hyperlink in XML by using CDATA tag. Embed the HTML tag - "<a>" inside CDATA as below. This will ensure that the XML file recognizes the contents inside the "<a>" tag as a hyperlink.
<xml_tag_name>
<![CDATA[
The file is here – <a href="https://abc.com/ver.txt">Click here for the file</a>
]]>
</xml_tag_name>
You should now be able to write the CDATA element inside a xml tag in the xml file via MATLAB.

カテゴリ

Help Center および File ExchangeStructured Data and XML Documents についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by