You are here:  » Cut out some field from xml

Cut out some field from xml

Submitted by vjeko11 on Mon, 2015-12-14 16:58 in

I have xml challenge ...
I shell cut out creditcard number from xml hotel reservation in fly.

Plaese some advice....

{code saved}

Submitted by support on Tue, 2015-12-15 11:24


The credit card number will be in the CUSTOMER/CC_NUMBER so to remove the field, at the very top of your myRecordHandler function, add this line:


Hope this helps!

Submitted by vjeko11 on Sat, 2015-12-19 13:18

thanks, but I wish to save xml after cutting.
is it possible... or some advice....


Submitted by support on Sat, 2015-12-19 13:41

Hello vjeko11,

Saving modified XML is not a function of Magic Parser i'm afraid but within your record handler function, after the unset() calls to remove any unwanted data, you can save the individual record content to a database, or a text file on disk for example...