You are here:  » Cut out some field from xml

Support Forum



Cut out some field from xml

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

Hi,
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

Hi,

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:

  unset($record["CUSTOMER/CC_NUMBER"]);

Hope this helps!
Cheers,
David

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....

thanks

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...

Cheers,
David
--
MagicParser.com