segunda-feira, 17 de agosto de 2009
sexta-feira, 24 de julho de 2009
segunda-feira, 20 de julho de 2009
quarta-feira, 13 de maio de 2009
sábado, 9 de maio de 2009
xml - 09 05 09 - 08:47
cImpXMLNavigator &= cImpExch.getNavigator()
cImpXMLNavigator.goToRoot()
bImpXmlRet = cImpXMLNavigator.goToFirstChild()
Loop
If bImpXmlRet <> CPXMLErr:NoError
Break
End
If cImpXMLNavigator.getNodeName() = 'Orders'
cImpXMLNavigator.setXMLExchangeNode()
! Set the node back into the Exchange object
bImpXmlRet = cImpExch.FromXML( cImpWrapperOD )
!And read in the set of OrderDetails for this order
If bImpXmlRet <> CPXMLErr:NoError
Message( 'An Error Occurred while Converting the XML Input. ' &|
'The error returned was: ' & bImpXmlRet,|
'Error Converting XML Output',|
ICON:Hand, BUTTON:OK )
End
End
bImpXmlRet = cImpXMLNavigator.goToNextSibling()
End
cImpExch.Close()
sexta-feira, 8 de maio de 2009
xml - clarion
!After global includes
INCLUDE('ABPRXML.INC'),ONCE
XML XMLGenerator !create an instance of the XMLGenerator class
---
XML.Init('\amarildo\b.XML')
XML.OpenDocument()
XML.SetEncoding('ISO-8859-1')
XML.XMLVersion = '1.0'
XML.SetRootTag('breakfast_menu')
XML.AddComment('The root tag is the first tag in the doc')
XML.AddTag('food','')
XML.AddAttribute('recordNumber','1','food')
XML.AddTag('name','Belgian Waffles',false,'food')
XML.AddTag('price','$5.95',false,'food')
XML.AddTag('description','two of our famous Belgian Waffles with plenty of real maple syrup',false,'food')
XML.AddTag('calories','650',false,'food')
XML.AddTag('food','')
XML.AddAttribute('recordNumber','2','food')
XML.AddTag('name','Strawberry Belgian Waffles',false,'food')
XML.AddTag('price','$7.95',false,'food')
XML.AddTag('description','light Belgian waffles covered with strawberries and whipped cream',false,'food')
XML.AddTag('calories','900',false,'food')
XML.CloseDocument()
INCLUDE('ABPRXML.INC'),ONCE
XML XMLGenerator !create an instance of the XMLGenerator class
---
XML.Init('\amarildo\b.XML')
XML.OpenDocument()
XML.SetEncoding('ISO-8859-1')
XML.XMLVersion = '1.0'
XML.SetRootTag('breakfast_menu')
XML.AddComment('The root tag is the first tag in the doc')
XML.AddTag('food','')
XML.AddAttribute('recordNumber','1','food')
XML.AddTag('name','Belgian Waffles',false,'food')
XML.AddTag('price','$5.95',false,'food')
XML.AddTag('description','two of our famous Belgian Waffles with plenty of real maple syrup',false,'food')
XML.AddTag('calories','650',false,'food')
XML.AddTag('food','')
XML.AddAttribute('recordNumber','2','food')
XML.AddTag('name','Strawberry Belgian Waffles',false,'food')
XML.AddTag('price','$7.95',false,'food')
XML.AddTag('description','light Belgian waffles covered with strawberries and whipped cream',false,'food')
XML.AddTag('calories','900',false,'food')
XML.CloseDocument()
quarta-feira, 29 de abril de 2009
Xml - Clarion - Comandos
XMLStringToDOM procedure(string xml), *Document
DOMToXMLString procedure(*Document doc, unsigned Format = Format:AS_IS), string
XMLFileToDOM procedure(string path), *Document
DOMToXMLFile procedure(*Document doc, string path),byte
QueueToDOM procedure(*queue que,,DOMStyle style=DOMStyle:ADO_26,
byte removePrefix = true,), *Document
DOMToQueue procedure(*Document doc, *queue q,, DOMStyle
style=DOMStyle:ADO_26,),byte
FileToDOM procedure(*file fl,, DOMStyle style=DOMStyle:ADO_26,
byte removePrefix = true,), *Document
DOMToFile procedure(*Document doc, *file fl,,
DOMStyle style=DOMStyle:ADO_26,),byte
GroupToDOM procedure(*group gr,, DOMStyle style=DOMStyle:ADO_26,
byte removePrefix = true,), *Document
DOMToGroup procedure(*Document doc, *group gr,,
DOMStyle style=DOMStyle:ADO_26,),byte
ViewToDOM procedure(*view vw,, DOMStyle style=DOMStyle:ADO_26,
byte removePrefix = true, unsigned maxRowCount = 0,),
*Document
ToXMLFile procedure(*file fl, string path,,
DOMStyle style=DOMStyle:ADO_26),byte
ToXMLFile procedure(*queue que, string path,,
DOMStyle style=DOMStyle:ADO_26),byte
ToXMLFile procedure(*view vw, string path,,
DOMStyle style=DOMStyle:ADO_26),byte
ToXMLFile procedure(*group gr, string path,,
DOMStyle style=DOMStyle:ADO_26),byte
FromXMLFile procedure(*file fl, string path,,
DOMStyle style=DOMStyle:ADO_26),byte
FromXMLFile procedure(*queue que, string path,,
DOMToXMLString procedure(*Document doc, unsigned Format = Format:AS_IS), string
XMLFileToDOM procedure(string path), *Document
DOMToXMLFile procedure(*Document doc, string path),byte
QueueToDOM procedure(*queue que,
byte removePrefix = true,
DOMToQueue procedure(*Document doc, *queue q,
style=DOMStyle:ADO_26,
FileToDOM procedure(*file fl,
byte removePrefix = true,
DOMToFile procedure(*Document doc, *file fl,
DOMStyle style=DOMStyle:ADO_26,
GroupToDOM procedure(*group gr,
byte removePrefix = true,
DOMToGroup procedure(*Document doc, *group gr,
DOMStyle style=DOMStyle:ADO_26,
ViewToDOM procedure(*view vw,
byte removePrefix = true, unsigned maxRowCount = 0,
*Document
ToXMLFile procedure(*file fl, string path,
DOMStyle style=DOMStyle:ADO_26),byte
ToXMLFile procedure(*queue que, string path,
DOMStyle style=DOMStyle:ADO_26),byte
ToXMLFile procedure(*view vw, string path,
DOMStyle style=DOMStyle:ADO_26),byte
ToXMLFile procedure(*group gr, string path,
DOMStyle style=DOMStyle:ADO_26),byte
FromXMLFile procedure(*file fl, string path,
DOMStyle style=DOMStyle:ADO_26),byte
FromXMLFile procedure(*queue que, string path,
Xml - Clarion
Clarion code:
CC byte
Customer QUEUE !queue to storing imported data
LastName STRING(30)
Phone STRING(30)
END
NameMap QUEUE(MapQueue) !queue with name mapping information
END
code
!Import data from file Customer.xml to Customer QUEUE.
!Destination QUEUE contains only LastName, Phone fields so data only for these
!fields is imported
cc = FromXMLFile(Customer,’Customer.xml’)
if (CC)
!Export data from Customer QUEUE to a file with name mapping
! Loading name mapping information from NAMEMAP.XML
CC=FromXMLFile(NameMap,’NameMap.xml’)
IF(CC)
CC = ToXMLFile(Customer,’CustomerData.xml’,NameMap)
IF(NOT CC)
STOP(‘Exporting error’)
END
ELSE
STOP(‘NameMap.xml importing error’)
END
ELSE
STOP(‘Customer.xml importing error’)
END
The result file
CC byte
Customer QUEUE !queue to storing imported data
LastName STRING(30)
Phone STRING(30)
END
NameMap QUEUE(MapQueue) !queue with name mapping information
END
code
!Import data from file Customer.xml to Customer QUEUE.
!Destination QUEUE contains only LastName, Phone fields so data only for these
!fields is imported
cc = FromXMLFile(Customer,’Customer.xml’)
if (CC)
!Export data from Customer QUEUE to a file with name mapping
! Loading name mapping information from NAMEMAP.XML
CC=FromXMLFile(NameMap,’NameMap.xml’)
IF(CC)
CC = ToXMLFile(Customer,’CustomerData.xml’,NameMap)
IF(NOT CC)
STOP(‘Exporting error’)
END
ELSE
STOP(‘NameMap.xml importing error’)
END
ELSE
STOP(‘Customer.xml importing error’)
END
The result file
sexta-feira, 24 de abril de 2009
Recuperar Xml
-html>
-head>
-script type="java/script">
function pegaxml(){
var objhttp=newactioneobject("microsoft........")
objhttp.open("get","http://....")
objhttp.send()
docum..... .. responsetext;
}
-/script>
-/head>
-body onload="pegaxml()">
-/body>
-/html>
-head>
-script type="java/script">
function pegaxml(){
var objhttp=newactioneobject("microsoft........")
objhttp.open("get","http://....")
objhttp.send()
docum..... .. responsetext;
}
-/script>
-/head>
-body onload="pegaxml()">
-/body>
-/html>
Assinar:
Postagens (Atom)