Hi,
With version hmg.3.0.36, I'm trying to use the TXMLDocument of contrib xhb, and does not work.
The question is whether this contrib was included in the version of hmg, and if that is not included, if possible inclusion?.
I appreciate any help.
Thank you very much.
Best Regards,
Javier
about contrib xhb in hmg.3.0.36
Moderator: Rathinagiri
Re: about contrib xhb in hmg.3.0.36
Hi Javier,
xhb it's a Harbour contrib library, not a Hmg contrib.
Rathinagiri download Harbour package and include it in Hmg distribution for our convenience
I think if xhb don't work you/we must send a message to Harbour mailing list
Cheers
xhb it's a Harbour contrib library, not a Hmg contrib.
Rathinagiri download Harbour package and include it in Hmg distribution for our convenience
I think if xhb don't work you/we must send a message to Harbour mailing list
Cheers
Luigi from Italy
www.L3W.it
www.L3W.it
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: about contrib xhb in hmg.3.0.36
Hi Javier,
Can you run the test programs in contrib directory?
Can you run the test programs in contrib directory?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: about contrib xhb in hmg.3.0.36
Hi Rathinagiri,
Thanks for answering,
I'm sorry, I have problems with my PC, and I can not perform any test at this time.
Thank you very much.
Best Regards,
Javier
Thanks for answering,
I'm sorry, I have problems with my PC, and I can not perform any test at this time.
Thank you very much.
Best Regards,
Javier
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
about contrib xhb in hmg.3.0.36
Today I needed it, TXMLDocument of contrib xhb. And I have included xHB lib and it worked ok.
See my code example:And this is XML file example (Arqxml.xml):
I hope to be usefull for someone alse.
See my code example:
Code: Select all
// Compile with xHB
Function Main(cArquivo)
SetMode(25,80)
If cArquivo=NIL
RetornaConteudoXml("Arqxml.xml")
Else
RetornaConteudoXml(cArquivo)
Endif
Return
Function RetornaConteudoXml(cFileName)
LOCAL hFile, cXml
LOCAL xmlDoc, xmlIter , xmlNode, cNode, cAttrib, cValue, oCampo, oConteudo
if !file(cFileName)
Alert("Arquivo "+cFileName+" nao encontrado !")
Return nil
end
cNode := NIL
cAttrib := NIL
cValue := NIL
hFile := FOpen( cFileName )
xmlDoc := TXmlDocument():New( hFile )
IF xmlDoc:nStatus != 1
Alert("erro ao ler XML ")
Return Nil
ENDIF
xmlIter := TXmlIterator():New( xmlDoc:oRoot )
xmlNode := xmlIter:Find()
DO WHILE xmlNode != NIL
if !empty(xmlNode:cData)
if subs(xmlNode:cData,1,1) # "<"
oCampo :=xmlNode:cName
oConteudo:=xmlNode:cData
endif
else
oCampo :=xmlNode:cName
oConteudo:=""
endif
alert( Padr("Campo...: "+oCampo,70)+";"+;
Padr("Conteudo: "+oConteudo,70))
xmlNode := xmlIter:Next() // joga pro proximo campo
ENDDO
Return nil Code: Select all
<webservicecep>
<resultado>1</resultado>
<resultado_txt>sucesso - cep completo</resultado_txt>
<uf>RS</uf>
<cidade>Porto Alegre</cidade>
<bairro>Passo D'Areia</bairro>
<tipo_logradouro>Avenida</tipo_logradouro>
<logradouro>Assis Brasil</logradouro>
</webservicecep>HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein