on 07-17-2008 1:40 AM
Hi,
I am mapping to the cXML from the idoc. In the cXML field call extrinsic I want to map a hyperlink to it. When I send it through the adapter look like XI convert the angle bracket <> to < and >. Here is what I tried to map
<URL name="TC">http://www.mycompany.pdf</URL>
Do you have any suggestion on how to escape the angle bracket conversion? I was trying different option below but non of them work. When I use the converstion code then it pass through as text. When I looked at the moni under technical routing xml it show the url link but when I open it with note pad then I see the bracket converted.
<URL name="TC">http://www.mycompany.pdf</URL>
"<"URL name="TC"">"http://www.mycompany.pdf"</URL">"
Thanks
MN
Try using CDATA
All text in an XML document will be parsed by the parser.
But text inside a CDATA section will be ignored by the parser.
CDATA - (Unparsed) Character Data
The term CDATA is used about text data that should not be parsed by the XML parser.
Characters like "<" and "&" are illegal in XML elements.
"<" will generate an error because the parser interprets it as the start of a new element.
"&" will generate an error because the parser interprets it as the start of an character entity.
Some text, like JavaScript code, contains a lot of "<" or "&" characters. To avoid errors script code can be defined as CDATA.
Everything inside a CDATA section is ignored by the parser.
A CDATA section starts with "<![CDATA[" and ends with "]]>":
Refer to http://www.w3schools.com/xml/xml_cdata.asp
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
MN,
Please have a look at the 'href' attribute
I have provided one example http://www.w3schools.com/HTML/html_links.asp --> Examples --> Create hyperlinks.
You may want to type 'href' in a search engine to find the syntax to meet you specific requirement
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I was tried the CDATA approached but it doesn't work. It send out as a text (see below) instead of hyperlink.
<![CDATA[<URL name="TC"> http://www.mycompany.pdf </URL>]]>
Any other suggestion would be appreciated.
Thanks
MN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
a good solution by riaz. another work around may be:- you can replace illigal characters
with " { " and write a script which will replace" { " with the " < "in xml file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can make use of CDATA.
e.g. if you have a node say
<Node1>String & with & Special & Characters like < angle > brackets</Node1>
replace it with
<Node1><![CDATA[String & with & Special & Characters like < angle > brackets
]]>
A CDATA section starts with
<![CDATA[
and ends with
]]>
Everything inside the CDATA section is ignored by the parser.
For more info about CDATA, refer - [http://www.w3schools.com/XML/xml_cdata.asp]
Regards,
Riyaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.