Alaska Software Inc. - XMLConfig
Username: Password:
AuthorTopic: XMLConfig
César Calvo XMLConfig
on Sat, 30 Sep 2017 14:21:31 +0200
Could anybody help me about this two clasess XmlConfigLoad and 
XmlConfigSave?
If I search this in help file of Alaska there aren´t this classess?
I mean what works that, etc?
Thanks in advance.
César Calvo.
Jorge L. BorlandoRe: XMLConfig
on Mon, 09 Oct 2017 23:09:08 -0300
Hi César

You can read xml file using the classs DOMDocument from msxml2
but it is not clear (for me) how to handle array structures within xml

I prefer the class _ot4xb_expando_() from Pablo Botella






En Sat, 30 Sep 2017 09:21:31 -0300, César Calvo <ccalvoc@telefonica.net>  
escribió:

> Could anybody help me about this two clasess XmlConfigLoad and  
> XmlConfigSave?
> If I search this in help file of Alaska there aren´t this classess?
> I mean what works that, etc?
> Thanks in advance.
> César Calvo.


Usando el cliente de correo de Opera: http://www.opera.com/mail/
Jorge L. BorlandoRe: XMLConfig
on Mon, 09 Oct 2017 23:09:13 -0300
Hi César

You can read xml file using the classs DOMDocument from msxml2
but it is not clear (for me) how to handle array structures within xml

I prefer the class _ot4xb_expando_() from Pablo Botella






En Sat, 30 Sep 2017 09:21:31 -0300, César Calvo <ccalvoc@telefonica.net>  
escribió:

> Could anybody help me about this two clasess XmlConfigLoad and  
> XmlConfigSave?
> If I search this in help file of Alaska there aren´t this classess?
> I mean what works that, etc?
> Thanks in advance.
> César Calvo.


Usando el cliente de correo de Opera: http://www.opera.com/mail/
Jorge L. BorlandoRe: XMLConfig
on Mon, 09 Oct 2017 23:09:13 -0300
Hi César

You can read xml file using the classs DOMDocument from msxml2
but it is not clear (for me) how to handle array structures within xml

I prefer the class _ot4xb_expando_() from Pablo Botella






En Sat, 30 Sep 2017 09:21:31 -0300, César Calvo <ccalvoc@telefonica.net>  
escribió:

> Could anybody help me about this two clasess XmlConfigLoad and  
> XmlConfigSave?
> If I search this in help file of Alaska there aren´t this classess?
> I mean what works that, etc?
> Thanks in advance.
> César Calvo.


Usando el cliente de correo de Opera: http://www.opera.com/mail/
Pavelas Pisarevskis Re: XMLConfig
on Thu, 12 Oct 2017 10:07:04 +0300
On Sat, 30 Sep 2017 14:21:31 +0200, in public.xbase++.generic you wrote:

> Could anybody help me about this two clasess XmlConfigLoad and 
> XmlConfigSave?
> If I search this in help file of Alaska there aren´t this classess?
> I mean what works that, etc?
> Thanks in advance.
> César Calvo.

hi!
for example you have next file config.xml 

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<config>
<database_engines>
  <dbeload name="pgdbe"/>
  <dbebuild name="DBFNTX">
     <storage name="DBFDBE"/>
     <order   name="NTXDBE"/>
  </dbebuild>
  <dbebuild name="DBFCDX">
     <storage name="DBFDBE"/>
     <order   name="CDXDBE"/>
  </dbebuild>
  <dbebuild name="FOXCDX">
     <storage name="FOXDBE"/>
     <order   name="CDXDBE"/>
  </dbebuild>

  <dbeload name="odbcdbe"/>
  <dbeload name="adsdbe"/>

</database_engines>
</config>


Example of using

  oCnf := XMLCONFIGLOAD( "config.xml" ) 
  IF !ISOBJECT( oCnf )
     quit
  endif    
      after success loading you can access tag's  values in next manner 
     oDbe := oCnf:Config:Database_Engines
     IF ISOBJECT( oXml:Config:Database_Engines:DbeLoad )
        oaLoad := { oXml:Config:Database_Engines:DbeLoad }
     else
        IF ISARRAY( oXml:Config:Database_Engines:DbeLoad )
           oaLoad := oXml:Config:Database_Engines:DbeLoad
        endif
     endif

     for i=1 to len( oaLoad )
        ....... processing each DbeLoad tag
     next

      if you need you can modify and save xml 
     XmlConfigSave( oCnf, "config.xml" ) 


Please notify - these functions not documented