AnsweredAssumed Answered

XML - working with Attributes and more than one Element of the same type

Question asked by goodhope on Nov 25, 2009
Latest reply on Nov 26, 2009 by comment_1


XML - working with Attributes and more than one Element of the same type


<!--  StartFragment  -->



I've managed to successfully get a simple XML fileinto Filemaker. What I would now appreciate assistance on is in two areas:



1. Some of the data that I'd like to work with isburied inside the element name in the form of attributes - how can I extractand use this (for instance: [CourtNumber Number="17022 and 17413" Year="2009"/]- here I'd like to use '17022 and 17413' and '2009').



2. In some cases I have more than one instance of anelement in my XML file to import (such as the 'CompanyName' tag below).Sometimes there is only one, sometimes more. When I use my XSLT I only bring inthe first piece of text (AA Consultancy Limited) and lose the second.



[CompanyName Class="Company"]AA CONSULTANCYLIMITED[/CompanyName]

[CompanyName Class="Company"]BB CONSULTANCYLIMITED[/CompanyName]




I realise that I need to make amendments to my XSLT,but I'm struggling to know what to do here.  Can anyone offer some assistance on the correct syntax andcommands for the XSLT file.


I’m defining all my XML elements inside the [Metadata]tag in my XSLT as:




then inside the ‘RESULTSET FOUND’ tag (again for allelements):


[COL][DATA][xsl:value-of select=”(path in XMLfile)/CompanyName”/][/DATA][/COL]

<!--  EndFragment  -->