Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10387

Re: XML Help please Norbert or John

From Martin <Martin@spam.spam>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: XML Help please Norbert or John
Date 2017-04-06 09:14 +0100
Organization A noiseless patient Spider
Message-ID <oc4t6j$fvb$1@dont-email.me> (permalink)
References <oc317d$bq$1@dont-email.me> <oc3f1n$j8a$1@dont-email.me>

Show all headers | View raw


Thanks John

On 05/04/2017 20:06, JohnMartens wrote:
> These are mine.
> If you have any other questions let me know
>
> FUNCTION SpecialKarOmzetten(cInhoud) AS STRING
>     *
>     * functie om alle speciale karakters eruit te halen en te vervangen
>     LOCAL cFuncResult AS STRING
>     LOCAL aSpecialKar AS ARRAY
>     LOCAL dwIndexNr AS DWORD
>     *
>     * array zetten
>     aSpecialKar := SpecialKar()
>     *
>     * string overnemen
>     cFuncResult := cInhoud
>     *
>     * aflopen alle speciale karakters
>     FOR dwIndexNr := 1 UPTO ALen(aSpecialKar)
>         *
>         * vervangen van dit karakter
>         cFuncResult :=
> StrTran(cFuncResult,aSpecialKar[dwIndexNr,1],aSpecialKar[dwIndexNr,2])
>     NEXT
> RETURN cFuncResult
>
> FUNCTION SpecialKar() AS ARRAY
>     *
>     * functie op array terug te geven die conversie mogelijk maakt
>     LOCAL aFuncResult := {} AS ARRAY
>     AAdd(aFuncResult,{CHR(217),'ë'})
>     AAdd(aFuncResult,{CHR(137),'ë'})
>     AAdd(aFuncResult,{CHR(130),'é'})
>     AAdd(aFuncResult,{CHR(138),'è'})
>     AAdd(aFuncResult,{CHR(148),'ö'})
>     AAdd(aFuncResult,{CHR(247),'ö'})
>     AAdd(aFuncResult,{CHR(162),'ó'})
>     AAdd(aFuncResult,{CHR(149),'ò'})
>     AAdd(aFuncResult,{CHR(129),'ü'})
>     AAdd(aFuncResult,{CHR(163),'ú'})
>     AAdd(aFuncResult,{CHR(151),'ù'})
>     AAdd(aFuncResult,{CHR(218),'é'})
> RETURN aFuncResult
>
> FUNCTION XmlSymbols2Kar(cInhoudMetSymbols AS STRING,cMode AS STRING) AS
> STRING
>     *
>     * functie om alle kodes eruit te halen en te vullen met speciale
> karakters
>     LOCAL cFuncResult AS STRING
>     LOCAL aXmlSymbols AS ARRAY
>     LOCAL dwIndexNr AS DWORD
>     *
>     * array zetten
>     aXmlSymbols := XmlSymbols()
>     *
>     * string overnemen
>     cFuncResult := cInhoudMetSymbols
>     *
>     * aflopen allen speciale karakters
>     FOR dwIndexNr := ALen(aXmlSymbols) DOWNTO 1
>         *
>         * vervangen van dit karakter
>         IF Empty(cMode) .or. aXmlSymbols[dwIndexNr,3] == cMode
>             cFuncResult :=
> StrTran(cFuncResult,aXmlSymbols[dwIndexNr,2],aXmlSymbols[dwIndexNr,1])
>         ENDIF
>     NEXT
> RETURN cFuncResult
>
>
> FUNCTION XmlSymbols2Kar(cInhoudMetSymbols AS STRING,cMode AS STRING) AS
> STRING
>     *
>     * replace Xml sybmols (also HTML) with special chars
>     LOCAL cFuncResult AS STRING
>     LOCAL aXmlSymbols AS ARRAY
>     LOCAL dwIndexNr AS DWORD
>     *
>     * array zetten
>     aXmlSymbols := XmlSymbols()
>     *
>     * string overnemen
>     cFuncResult := cInhoudMetSymbols
>     *
>     * aflopen allen speciale karakters
>     FOR dwIndexNr := ALen(aXmlSymbols) DOWNTO 1
>         *
>         * vervangen van dit karakter
>         IF Empty(cMode) .or. aXmlSymbols[dwIndexNr,3] == cMode
>             cFuncResult :=
> StrTran(cFuncResult,aXmlSymbols[dwIndexNr,2],aXmlSymbols[dwIndexNr,1])
>         ENDIF
>     NEXT
> RETURN cFuncResult
>
> FUNCTION XmlSymbols() AS ARRAY
>     *
>     * functie op array terug te geven die conversie mogelijk maakt
>     * Kar->Sym: start with & so converted chars will not be reconverted
>     * Sym->Kar: other way around as above
>     LOCAL aFuncResult := {} AS ARRAY
>     AAdd(aFuncResult,{'&','_|_amp_|_','_|E|X'})
>     AAdd(aFuncResult,{' ','&nbsp;','_'})
>     AAdd(aFuncResult,{'"','&quot;','_'})
>     AAdd(aFuncResult,{"'",'&#039;','_'})
>     AAdd(aFuncResult,{CRLF,'&#10;','_'})
>     AAdd(aFuncResult,{'<','&lt;','_|E'})  // Essentieel
>     AAdd(aFuncResult,{'>','&gt;','_|E'})  // Essentieel
>     AAdd(aFuncResult,{CHR(9),'&nbsp;&nbsp;&nbsp;&nbsp;','_|E'})  //
> Essentieel
>     AAdd(aFuncResult,{CRLF,'<BR>','_|E'}) // Essentieel
>     AAdd(aFuncResult,{CHR(10),'','_|E'})  // Essentieel
>     //AAdd(aFuncResult,{'/','&#047;','_'})
>     //AAdd(aFuncResult,{'\','&#092;','_'})
>     AAdd(aFuncResult,{"'","\'",'_'})
>     AAdd(aFuncResult,{'"','\"','_'})
>     AAdd(aFuncResult,{'ë','&euml;','*'})
>     AAdd(aFuncResult,{'é','&eacute;','*'})
>     AAdd(aFuncResult,{'è','&egrave;','*'})
>     AAdd(aFuncResult,{'ö','&ouml;','*'})
>     AAdd(aFuncResult,{'ó','&oacute;','*'})
>     AAdd(aFuncResult,{'ò','&ograve;','*'})
>     AAdd(aFuncResult,{'ü','&uuml;','*'})
>     AAdd(aFuncResult,{'ú','&uacute;','*'})
>     AAdd(aFuncResult,{'ù','&ugrave;','*'})
>     AAdd(aFuncResult,{CHR(169),'&copy;','*'})
>     AAdd(aFuncResult,{CHR(128),'&euro;','*'}) // Euro
>     AAdd(aFuncResult,{'_|_amp_|_','&amp;','_|E|X'})
> RETURN aFuncResult
>
>
> Op 5-4-2017 om 17:10 schreef Martin:
>> OK I have both sources but unable to compile either due to missing
>> functions.
>>
>> The Norbert code with objects of
>>
>> MyIXMLDOMNode
>> MyIXMLDOMNodeList
>> MyIXMLDOMNamedNodeMap
>>
>> The John code of
>>
>> SpecialKarOmzetten
>> XmlSymbols2Kar
>>
>> Any more details would be brilliant
>>
>>
>>
>> If I didn't have someone hassling me I probably would work it out
>> myself!!!!!!!
>>
>>
>> Thanks
>>
>> Martin

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

XML Help please Norbert or John Martin <Martin@spam.spam> - 2017-04-05 16:10 +0100
  Re: XML Help please Norbert or John JohnMartens <martens@tennishulp.info> - 2017-04-05 21:06 +0200
    Re: XML Help please Norbert or John Martin <Martin@spam.spam> - 2017-04-06 09:14 +0100
    Re: XML Help please Norbert or John Martin <Martin@spam.spam> - 2017-04-06 16:47 +0100
      Re: XML Help please Norbert or John JohnMartens <martens@tennishulp.info> - 2017-04-06 22:28 +0200
        Re: XML Help please Norbert or John Martin <Martin@spam.spam> - 2017-04-07 10:31 +0100
        Re: XML Help please Norbert or John Martin <Martin@spam.spam> - 2017-04-07 10:32 +0100
  XML Help please Norbert or John nk <n.kolb@aon.at> - 2017-04-06 01:08 +0200
    Re: XML Help please Norbert or John Martin <Martin@spam.spam> - 2017-04-11 12:44 +0100

csiph-web