PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
Aula 1041 - WebService - 004 - Ajustando Xml Lista Site WebService
Aula 1041 - WebService - 004 - Ajustando Xml Lista Site WebService
Started by amarildo, Jan., 20 2017 11:06 AM - 1 reply
Connect yourself…
amarildo
#1
Registered member
535 messages
Popularité : +14 (14 votes)
Posted on January, 20 2017 - 11:06 AM
// 1) Vamos ajustar Xml Lista Site
// 2 - Vou Deixar Tudo Minusculo
// 3 - Alterar Sites_Uteis id
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
Procedure
Lista_Sites
(
)
//1 - Vou Deixar Tudo Minusculo
//2 - Alterar Sites_Uteis id1
s
_resultado_xml is
string
=
""
// Criando Resultado Xml String
s
_resultado_xml
+
=
"<xml>"
//Criando Tag Inicial Xml
s
_resultado_xml
+
=
"<retorno>"
// Criando Tag Inicial Retorno
FOR EACH sites_uteis
// Percorrendo Tabela Sites Uteis
//Criei uma String Texto //Coloquei o que desejo dentro []
s
_texto is
string
=
[
<site_uteis id="@id@">
]
s
_texto
=
NoSpace
(
Replace
(
s
_texto
,
"@id@"
,
NumToString
(
sites_uteis.id_sites_uteis
,
"05d"
)
)
)
//Depois disso vai ficar <site_uteis id="00001">
//Abrindo Tag Site Uteis
s
_resultado_xml
+
=
s
_texto
s
_resultado_xml
+
=
"<titulo>"
+
NoSpace
(
sites_uteis.titulo
)
+
"</titulo>"
//Abrindo e fechando tag com nome titulo
s
_resultado_xml
+
=
"<titulo_link>"
+
NoSpace
(
sites_uteis.titulo_link
)
+
"</titulo_link>"
//Abrindo e fechando tag com link
s
_resultado_xml
+
=
"</site_uteis>"
//Fechando Tag Site Uteis
END
s
_resultado_xml
+
=
"</retorno>"
// Criando Tag Final Retorno
s
_resultado_xml
+
=
"</xml>"
// Criando Tag Final Xml
RESULT
(
s
_resultado_xml
)
//<Xml>
//<Retorno>
//<empresa>Empresa Matos Informatica</empresa>
//<Site_uteis id="00001">
//<titulo>Matos Informatica</titulo>
//<titulo_link>www.matosinformatica.com.br</titulo_link>
//</Site_uteis>
//<Site_uteis id="00002">
//<titulo>Amarildo</titulo>
//<titulo_link>www.amnarildo.com.br</titulo_link>
//</Site_uteis>
//</Retorno>
//</Xml>
http://windevdesenvolvimento.blogspot.com.br/2017/01/aula-1041-webservice-004-ajustando-xml.html
Report
0
0
BOLLER
#2
Registered member
3,651 messages
Popularité : +175 (223 votes)
Posted on February, 09 2017 - 11:01 AM
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text