0
我们有这个XML(缩短和简化了这个问题)的第160个字符,回到我们的ColdFusion的应用程序,它被解析出来,用于在新闻辊:XML - 获取特定节点
<newsItems>
<newsItem content="The International Rugby Board (IRB) has confirmed that it will take a hardline stance on any team that breaks certain parameters when an nation performs a traditional haka. This will not only apply to the All Blacks haka, but the various challenges performed by the Pacific Island teams as well for moving too close to the Black Ferns while they performed their haka. The Australian Rugby Union (ARU) paid the fine, after it was revealed by a Sydney newspaper that there was a clause in the IRB tournament rules that dictated that teams must face the haka, and remain 10 metres on their own side of the halfway line. For the record the Black Ferns won that pool match 32-5. Senior IRB officials confirmed that the regulation was in place - and had been for some time - but the fine imposed on the ARU was the first time that formal action had been taken." extension="jpg" fileName="261840D4-CADD-6C4E-ACAF532ACFF12388" link="news/14266/IRB-confirms-haka-will-not-be-challenged" title="IRB confirms haka will not be challenged....."/>
</newsitems>
但是,最初我们只想返回内容的前160个字符。我们不想将几千个字符拖拽到应用程序中,然后只解析出前160个字符。我们需要将XML仅带入前160个字符,然后使用该XML。
最简单的方法是什么?
由于提前, 保罗
你没有提到XML来自哪里。如果您希望避免使用超过160个字符,那么您可能必须在XML的任何位置执行此操作。 – barnyr