NITF:因为HTML实体而无法加载objDOM [英] NITF: cant load objDOM because of HTML-entities
问题描述
我收到NITF-XML新闻机构的新闻。
然后我想用XML和放大器将它们导入我的CMS ; SOAP。
导入工具运行正常,如果我有一个带有真实
德语特殊字符的xml文档,而不是HTML实体。
>
不幸的是,我收到实体的新闻并收到此错误
(翻译自德语):
输入XML文件中的解析错误:未定义的参考实体
''auml''。
我的代码:
设置objDom = CreateObject(" MSXML2.DOMDocument.3.0 ")
objDom.setProperty" SelectionLanguage"," XPath"
objDom.async = False objDom.setProperty" SelectionNamespaces",
" xmlns:tcmapi =''http://www.tridion.com/ContentManager/5.0/TCMAPI''"
objDom.Load(strFilePath& strXmlFileName)
如果不是objDom.parseError.reason =""然后
WriteToLog输入XML文件中的解析错误: &
objDom.parseError.reason
结束如果
感谢您的帮助!
Ragnar
Hi,
I am receiving news from a press-agency in NITF-XML.
Then I want to import them into my CMS using XML&SOAP.
The import-tool runs fine if I have got an xml-document with real
German special characters, not HTML entities.
Unfortunately I receive the news with entities and get this error
(translate from German):
Parse Error in input XML file: Reference to a not definded entity
''auml''.
my code:
Set objDom = CreateObject("MSXML2.DOMDocument.3.0")
objDom.setProperty "SelectionLanguage", "XPath"
objDom.async = False objDom.setProperty "SelectionNamespaces",
"xmlns:tcmapi=''http://www.tridion.com/ContentManager/5.0/TCMAPI''"
objDom.Load (strFilePath & strXmlFileName)
If Not objDom.parseError.reason = "" Then
WriteToLog "Parse Error in input XML file: " &
objDom.parseError.reason
End If
thanks for your help!
Ragnar
推荐答案
Ragnar Heil写道:
Ragnar Heil wrote:
我收到NITF-XML新闻机构的新闻。
然后我想用XML和SOAP将它们导入我的CMS。
如果我有的话,导入工具运行正常一个带有真实
德语特殊字符的xml文档,而不是HTML实体。
不幸的是我收到了实体的新闻并得到了这个错误
(翻译自德语):
输入XML文件中的分析错误:引用未定义的实体
''auml''。
我的代码:
设置objDom = CreateObject(" MSXML2.DOMDocument。 3.0")
objDom.setProperty" SelectionLanguage"," XPath"
objDom.async = False objDom.setProperty" SelectionNamespaces",
" xmlns:tcmapi =''http ://www.tridion。 com / ContentManager / 5.0 / TCMAPI''"
objDom.Load(strFilePath& strXmlFileName)
如果不是objDom.parseError.reason =""然后
WriteToLog输入XML文件中的解析错误: &
objDom.parseError.reason
结束如果
I am receiving news from a press-agency in NITF-XML.
Then I want to import them into my CMS using XML&SOAP.
The import-tool runs fine if I have got an xml-document with real
German special characters, not HTML entities.
Unfortunately I receive the news with entities and get this error
(translate from German):
Parse Error in input XML file: Reference to a not definded entity
''auml''.
my code:
Set objDom = CreateObject("MSXML2.DOMDocument.3.0")
objDom.setProperty "SelectionLanguage", "XPath"
objDom.async = False objDom.setProperty "SelectionNamespaces",
"xmlns:tcmapi=''http://www.tridion.com/ContentManager/5.0/TCMAPI''"
objDom.Load (strFilePath & strXmlFileName)
If Not objDom.parseError.reason = "" Then
WriteToLog "Parse Error in input XML file: " &
objDom.parseError.reason
End If
如果XML文档使用实体引用那么这些实体需要是
如果@auml,则定义
;用于需要在声明实体的文档类型定义中有实体声明
,否则
XML格式不正确。
-
Martin Honnen
http://JavaScript.FAQTs.com/
Martin Honnen< ma ******* @ yahoo.de>在新闻中写道:419ce15d
Martin Honnen <ma*******@yahoo.de> wrote in news:419ce15d
0
这篇关于NITF:因为HTML实体而无法加载objDOM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!