Function overview
Prototype
xmlWithoutFirstTag (
xml )
Parameters
xml
Description
the xml without the first tag and its content
-- part or xmlGetH / xmlSetH ---
requires also xmlTagN.valuePosEnd ( ) !
[fmfunctions.com does not let me add it to required list..]
Examples
Sample input
<contact><ID>2354</ID><Lastname>Frank</Lastname></contact><letter><ID>234</ID></letter>
Sample output
<letter><ID>234</ID></letter>
Function code
Let([
name =xmlFirstTagName ( xml );
start=xmlTagN.valuePosEnd ( name ; xml ; 1 ) + Length ( name ) + 4 ;
tagR= Middle( xml ; start ; Length ( xml ) - start + 1) ];
TrimSpaceCR ( tagR)
)
// ===================================
/*
This function is published on FileMaker Custom Functions
to check for updates and provide feedback and bug reports
please visit http://www.fmfunctions.com/fid/240
Prototype: xmlWithoutFirstTag( xml )
Function Author: konrad (http://www.fmfunctions.com/mid/224)
Last updated: 12 December 2009
Version: 1.1
*/
// ===================================
Let([__LITBR____LITBR__name =xmlFirstTagName ( xml );__LITBR__start=xmlTagN.valuePosEnd ( name ; xml ; 1 ) + Length ( name ) + 4 ;__LITBR__tagR= Middle( xml ; start ; Length ( xml ) - start + 1) ];__LITBR____LITBR____LITBR__TrimSpaceCR ( tagR) __LITBR__ __LITBR__ )__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/240__LITBR____LITBR__ Prototype: xmlWithoutFirstTag( xml )__LITBR__ Function Author: konrad (http://www.fmfunctions.com/mid/224)__LITBR__ Last updated: 12 December 2009__LITBR__ Version: 1.1__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.