XML/Output: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: adjusted a DO-loop indentation. -- ~~~~) |
(→{{header|REXX}}: made REXX entry compitable to older REXXes. -- ~~~~) |
||
Line 1,486: | Line 1,486: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
REXX doesn't have any functions to handle XML entities, an abbreviated version is included here. |
REXX doesn't have any functions to handle XML entities, an abbreviated version is included here. |
||
<br>Some older REXXes don't have the '''changestr''' bif, so that is included here as a subroutine. |
|||
<lang rexx>/*REXX program to create a list of character names & remarks. */ |
<lang rexx>/*REXX program to create a list of character names & remarks. */ |
||
charname.= |
charname.= |
||
Line 1,694: | Line 1,695: | ||
if a then x=xml_(?,"amp") /*if we had an ampersand, translate it now.*/ |
if a then x=xml_(?,"amp") /*if we had an ampersand, translate it now.*/ |
||
if b then x=xml_(??,"semi") /*if we had a semicolon, translate it now.*/ |
if b then x=xml_(??,"semi") /*if we had a semicolon, translate it now.*/ |
||
return x |
return x |
||
/*───────────────────────────CHANGESTR subroutine───────────────────────*/ |
|||
changestr: procedure; parse arg o,h,n; r=; w=length(o); if w==0 then return n||h |
|||
do forever; parse var h y (o) _ +(w) h; if _=='' then return r||y; r=r||y||n; end</lang> |
|||
'''output''' |
'''output''' |
||
<pre style="overflow:scroll"> |
<pre style="overflow:scroll"> |