Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

The use of serialize

kc
Level 8
Level 8
Hi all,



I am trying to use the serialize xpath function to serialize an xml variable to a string, but nothing is stored in the string:



/process_data/myString = serialize(/process_data/myXmlVar/*, true())



What am I doing wrong?



Thanks in advance.



Sincerely

Kim
3 Replies
Jasmin_Charbonn
Level 10
Level 10
Try the following:



/process_data/myString = serialize(/process_data/myXmlVar/*)



Jasmin
Ryan_Lunka
Level 5
Level 5
Do you need the /*? I think I've serialized an XML document without it.



Ryan D. Lunka

Cardinal Solutions Group

rlunka@cardinalsolutions.com
Jasmin_Charbonn
Level 10
Level 10
Yes you can. It just depends what xml you want to serialize. The serialize function doesn't care as long as it's valid xml.



Jasmin