Skip to main content
13-Aquamarine
July 20, 2020
Solved

With the ACL language, How to convert in a string the entity character "amp" to the real character

  • July 20, 2020
  • 1 reply
  • 4251 views

Hello,

With the ACL language, How to convert in a string the character entity "amp" to the real character "&"?

I would like a function which converts all entities.

David

Best answer by GarethOakes

Again, I strongly recommend reviewing the ACL reference in the Arbortext Help Center. Here is what you seek: http://support.ptc.com/help/arbortext_hc/ae71_hc/en/index.html#page/Program%2Facl_ref%2Fhelp977.html%23

1 reply

16-Pearl
July 21, 2020

https://support.ptc.com/help/arbortext_hc/ae71_hc/en/index.html#page/Program/acl_ref/help909.html

 

This is documented in the Arbortext Help Center, link above. For example, for the declaration <!ENTITY Auml “&#38;#x00C4”> the function entity("Auml") returns "D" (character 0xc4).

To do this for all entities in an Arbortext document you can use the ACL function doc_flatten("text") as described in the link below.

 

https://support.ptc.com/help/arbortext_hc/ae71_hc/en/index.html#page/Program%2Facl_ref%2Fhelp7789.html%23

dgopois13-AquamarineAuthor
13-Aquamarine
July 21, 2020

Hello,

Thank for your response.

But, for example I assign a variable with the following text "Engineers &amp; technicians" and I would like display in a dialog box the text : Engineers & technicians.

David

16-Pearl
July 21, 2020

Again, I strongly recommend reviewing the ACL reference in the Arbortext Help Center. Here is what you seek: http://support.ptc.com/help/arbortext_hc/ae71_hc/en/index.html#page/Program%2Facl_ref%2Fhelp977.html%23