Jump to content

FMDiff XML


THMS
 Share

This topic is 4375 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello All,

I have been playing around with this XML and XSLT for a while and feel like I am banging my head against the wall.

I have an XML file generated by FMDiff and I'm trying to pull the data into a FileMaker file.

Attached is the XML that I have. FMDiffTEST.xml

What I am trying to pull in is just the differences and of those:

toplevel, action, old, new

So in the example below there would be two records -

toplevel = functions, action = delete, old = Trim4, new = ""

toplevel = functions, action = insert, old = "", new = uID_Create Copy

Any help would be greatly appreciated.

Tom

__

<functions toplevel='yes'>

			<object id='#&quot;05&quot;' action='delete'>

				<name name='Name' action='delete'>

					<old>Trim4</old>

				</name>

			</object>

			<object id='#&quot;07&quot;' action='insert'>

				<name name='Name' action='insert'>

					<new>uID_Create Copy</new>

				</name>

			</object>

		</functions>

Link to comment
Share on other sites

  • Newbies

Thank you very much for this. It does pretty much what I want it to and I think I am good with making some modifications to it.

The only piece that still confuses me is how to get the text "scripts" out of the tag <scripts> or <layouts> etc. These tags show with no other information and perhaps it's not possible to pull out the tag when you don't know what it will be.

Thanks again, this was a big help.

Tom

Well, the thing is that the XML file is rather more complex than your example - so I am not sure what exactly you want to extract.

Anyway, have a look at the attached.

Link to comment
Share on other sites

how to get the text "scripts" out of the tag <scripts> or <layouts> etc.

The name() function does that.

perhaps it's not possible to pull out the tag when you don't know what it will be.

Well, if you knew what it will be, you wouldn't have to pull it out... But if you know where in the hierarchy it will be, then you can use that - as shown in my demo.

Link to comment
Share on other sites

  • Newbies

Thanks again. It finally clicked in my head.

The name() function does that.

Well, if you knew what it will be, you wouldn't have to pull it out... But if you know where in the hierarchy it will be, then you can use that - as shown in my demo.

Link to comment
Share on other sites

This topic is 4375 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.