我正在尝试解析imds indesign文档,该文档基本上是XML
这是节点的结构
<ParagraphStyleRange content="AuthorName" AppliedParagraphStyle="ParagraphStyle/FIRMA articolo lateraleOK">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>di Emanuele VILLA</Content>
<Br />
</CharacterStyleRange>
</ParagraphStyleRange>
我在节点必须替换一些内容的节点中添加为引用content="xxxx"
。
在这种情况下,我必须搜索content="AuthorName"
所在的节点,然后使用Nokogiri替换<Content></Content>
标签内的文本。
我找不到将Nokogiri与Xpath或CSS结合使用的方法