AnsweredAssumed Answered

XML - managing to extract and use all textual paragraphs on import

Question asked by goodhope on Nov 26, 2009
Latest reply on Feb 18, 2010 by bvoth

Title

XML - managing to extract and use all textual paragraphs on import

Post

Hello,Another area that I'm struggling with on my XML import is managing to handle multiple paragraphs. For instance in the XML file example below I have two paragraphs of text that I'd like to bring into a Filemaker field (there may be one of these or many). Currently I have an XSLT set up to see element [Text]. On import only the first paragraph text is visible - I seem to lose the second! How do I get my XSLT to recognise and pass through all text inside the [Text] tags? (I have examples below of my XML file and XSLT).As always help is greatefully received.Regards NickXML FILE:[?xml version="1.0" encoding="UTF-8"?][Paper][Body][Category Type="2"][Section Type="Administration"][Notice Type="10" Reference="345678"][Metadata][PublishDate]2009-08-08[/PublishDate][SupplierNoticeID]8B51588-070293[/SupplierNoticeID][NoticeClass]Standard[/NoticeClass[[/Metadata][Title]Justice League[/Title][Text]First paragraph of text.[/Text][Text]Another paragraph of text. [/Text][/Notice][/Section][/Category][/Body][/Paper] XSLT FILE:[?xml version="1.0"encoding="UTF-8"?][xsl:stylesheetversion="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"][xslutputmethod="xml" version="1.0" encoding="utf-8"indent="yes"/][xsl:templatematch="/"][FMPXMLRESULTxmlns="http://www.filemaker.com/fmpxmlresult"][ERRORCODE]0[/ERRORCODE][PRODUCT BUILD=""NAME="" VERSION=""/][DATABASEDATEFORMAT="" LAYOUT="" NAME=""RECORDS="" TIMEFORMAT=""/][METADATA][FIELDNAME="Title" TYPE="TEXT" EMPTYOK="YES"MAXREPEAT=""/][FIELDNAME="Text" TYPE="TEXT" EMPTYOK="YES"MAXREPEAT=""/][/METADATA][RESULTSET FOUND=""][ROW MODID=""RECORDID=""][COL][DATA][xsl:value-ofselect="Paper/Body/Category/Section/Notice/Title"/][/DATA][/COL][COL][DATA][xsl:value-of select="Paper/Body/Category/Section/Notice/Text"/][/DATA][/COL][/ROW][/RESULTSET][/FMPXMLRESULT][/xsl:template][/xsl:stylesheet]

Outcomes