How To Use Comma In Xml
But the query method returns the data of xml type which will hinder to do so henceforth first we need to convert the xml data type to varchar and then we can use the replace function.
How to use comma in xml. I am having some difficulties understanding how to use comma in format number in xml. Source sends the data in below format because of constraint on their system. Hi i have below transformation requirement in tibco bw 5 x. To include special characters inside xml files you must use the numeric character reference instead of that character. For example xsl value of select format number 123456 gives me 12 34 56 but from what i read the comma is a group separator so i thought it should have been 1234 56.
Name1 name2 name3 1 2 3 developer lead manager need to convert to below format. Then an xsltransform object from the system xml xsl namespace is created the xsl stylesheet is loaded and the xsl transform is. Can someone explain it to me please. The numeric character reference must be utf 8 because the supported encoding for xml files is defined in the prolog as encoding utf 8 and should not be changed. I ll use the cross apply method since that is easiest imo to read.
I ll paste the query using the value method with 5 different columns the before query as well as the comma separated way using for xml path and cross apply to show the difference in the query and output. The above query returns a space separated list with the values stored in the xml fragment to fulfill our objective we can use replace function to replace the spaces with comma s. The first step is to wrap the comma delimited data with root root xml tags so it can be treated as an xml document.