XML tutorial

XML tutorial

Postby Antonio Linares » Sat Jun 09, 2012 12:44 pm

Really simple XML tests:

Code: Select all  Expand view
function Main()

   local oXml  := TXmlDocument():New(), oNode

   oNode = oXml:oRoot:AddBelow( TXmlNode():New( 0, "FORM" ) )
   
   oNode:AddBelow( TXmlNode():New( 0, "CAPTION",, "Hello world" ) )
   oNode:AddBelow( TXmlNode():New( 0, "TOP",, "100" ) )
   oNode:AddBelow( TXmlNode():New( 0, "LEFT",, "100" ) )
   oNode:AddBelow( TXmlNode():New( 0, "WIDTH",, "400" ) )
   oNode:AddBelow( TXmlNode():New( 0, "HEIGHT",, "300" ) )

   MsgInfo( oXml:oRoot:ToString() )

return nil
 


Result:
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: XML tutorial

Postby Eoeo » Mon Jun 11, 2012 4:01 pm

Good Antonio,
and if I a xml and I wish create for a sample a dbf How I can make :

sample test for xml from dbf :

Code: Select all  Expand view

 <?xml version="1.0" encoding="ISO-8859-1" ?>
- <ROOT DATABASE="fornito.dbf">
- <Structure>
- <Field>
  <Field_name>PRNOMBRE</Field_name>
  <Field_type>Character</Field_type>
  <Field_length>40</Field_length>
  <Field_decimals>0</Field_decimals>
  </Field>

<Data>
<Record>
  <PRNOMBRE>test1</PRNOMBRE>
</Record>
<Record>
  <PRNOMBRE>test2</PRNOMBRE>
</Record>
  </Data>
  </ROOT>
User avatar
Eoeo
 
Posts: 222
Joined: Mon Jun 04, 2012 12:00 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 101 guests