我需要以编程方式创建一个有效的iTunes播客RSS与PowerShell。
我在为所有特定于iTunes的元素创建名称空间时遇到了问题,例如...
<itunes:image>
<itunes:name>我尝试过使用Get-Content导入下面的内容,但没有成功。
<itunes xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<image>"logo.png"</image>
</itunes>[xml]$itunesxml = Get-Content -Path './itunes.xml'<root>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<image>"logo.png"</image>
</root>导入此文件可以让我...
Cannot convert value "System.Object[]" to type "System.Xml.XmlDocument". Error: "The 'xsl:stylesheet' start tag on line 3 position 2 does not match the end tag of 'root'. Line 7, position 3."
At line:1 char:1
+ [xml]$itunesxml = Get-Content -Path './itunes.xml'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [], ArgumentTransformationMetadataException
+ FullyQualifiedErrorId : RuntimeException我希望能够生成一些XML,我可以将这些XML添加到我已经能够编程生成的XML中。
发布于 2019-05-13 01:38:47
xsl:stylesheet的结束元素丢失,请尝试:
<root>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<image>"logo.png"</image>
</xsl:stylesheet>
</root>https://stackoverflow.com/questions/56101431
复制相似问题