我具有以下XML结构,并且我试图仅捕获消息“ TypeError: null is not an object (evaluating 'currentMarker.showCallout')
This error is located at:
in App (at renderApplication.js:35)
in RCTView (at View.js:45)
in View (at AppContainer.js:98)
in RCTView (at View.js:45)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:34)
setMarkerRefresh
”。但是,当我阅读元素/ messageText时,我得到了其中的完整元素。是否可以单独阅读以粗体突出显示的消息?
This is a sample message
答案 0 :(得分:2)
这应该给您一个想法。基本上是在选择text()
元素的子messageText
节点。不是text()
元素的子accessibilityText
节点。
<xsl:template match="messageText">
<xsl:copy-of select="text()"/>
</xsl:template>
或这个
<xsl:copy-of select="messageText/text()"/>