// FiveWin PIM (personal information manager)
#include "FiveWin.ch"
#include "Splitter.ch"
#include "xbrowse.ch"
static oWnd, oBtnSave, oImageList, oMruRCs
//----------------------------------------------------------------------------//
function Main()
local oBar, oMenuNew
local oBmpTiled
DEFINE BITMAP oBmpTiled RESOURCE "background"
DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 ;
TITLE FWVERSION + " PIM" ;
MENU BuildMenu() MDI
DEFINE BUTTONBAR oBar SIZE 70, 70 OF oWnd 2010
DEFINE BUTTON OF oBar PROMPT "New" ;
TOOLTIP "New" NOBORDER RESOURCE "New"
DEFINE BUTTON OF oBar PROMPT "Open" ;
TOOLTIP "Open" NOBORDER RESOURCE "Open" ;
ACTION OpenDataFile()
DEFINE BUTTON oBtnSave OF oBar PROMPT "Save" ;
TOOLTIP "Save" NOBORDER RESOURCE "Save" ACTION Save()
oBtnSave:Disable()
DEFINE BUTTON OF oBar GROUP PROMPT "Exit" ;
TOOLTIP "Exit" NOBORDER RESOURCE "Exit" ACTION oWnd:End()
oImageList = TImageList():New()
oImageList:Add( TBitmap():Define( "folder",, oWnd ),;
TBitmap():Define( "fldmask",, oWnd ) )
oImageList:Add( TBitmap():Define( "dialog",, oWnd ),;
TBitmap():Define( "dlgmask",, oWnd ) )
oImageList:Add( TBitmap():Define( "icon",, oWnd ),;
TBitmap():Define( "icomask",, oWnd ) )
oImageList:Add( TBitmap():Define( "bitmap",, oWnd ),;
TBitmap():Define( "bmpmask",, oWnd ) )
oImageList:Add( TBitmap():Define( "includes",, oWnd ),;
TBitmap():Define( "incmask",, oWnd ) )
DEFINE MSGBAR OF oWnd PROMPT "Personal Information Manager (c) FiveTech Software 2020" DATE KEYBOARD 2010
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT DrawTiled( hDC, oWnd, oBmpTiled )
// VALID MsgYesNo( "Want to end ?" )
oBmpTiled:End()
oImageList:End()
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&File"
MENU
MENUITEM "&New" RESOURCE "new2"
MENUITEM "&Open" RESOURCE "Open2" ;
ACTION OpenDataFile()
MENUITEM "&Save as..."
SEPARATOR
MENUITEM "Recent files"
MENU
MRU oMruRCs ;
FILENAME ".\re.ini" ; // .INI to manipulate. '\.' for local
SECTION "Recent RC files" ; // The name of the INI section
ACTION OpenDataFile( cMruItem ) ; // cMruItem is automatically provided
MESSAGE "Open this file" ; // The message for all of them
SIZE 10
ENDMENU
SEPARATOR
MENUITEM "&Exit..." ACTION oWnd:End() RESOURCE "Exit2"
ENDMENU
MENUITEM "&Edit"
oMenu:AddMDI()
oMenu:AddHelp( "FiveWin Resources Editor", "FiveTech 1993-2018" )
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function Save()
local oTreeView := oWnd:oWndActive:aControls[ 1 ]
local cText := "", cFileName := oWnd:oWndActive:GetText()
oTreeView:Scan( { | oItem | BuildXML( oItem, @cText ) } )
if File( cFileName )
if MsgYesNo( "Do you want to overwrite " + cFileName + " ?",;
cFileName + " already exists" )
// MemoWrit( cFileName, cText )
MsgInfo( cText )
oBtnSave:Disable()
endif
else
MemoWrit( cFileName, cText )
oBtnSave:Disable()
endif
return nil
//----------------------------------------------------------------------------//
function BuildXML( oItem, cText )
if oItem:oParent != nil
cText += CRLF
endif
cText += "<" + oItem:cPrompt + ">"
if ! Empty( oItem:Cargo )
cText += oItem:Cargo
endif
if Len( oItem:aItems ) == 0
cText += "</" + oItem:cPrompt + ">"
endif
if oItem:oParent != nil
if oItem == ATail( oItem:oParent:aItems )
cText += CRLF + "</" + oItem:oParent:cPrompt + ">"
endif
endif
return .F. // so it iterates the entire tree
//----------------------------------------------------------------------------//
function OpenDataFile( cFileName )
local oWndData, oTree, oMemo, oSplit
local cTxtFile, cLine, nFrom := 1, cItemText := "", cText
local oItem, oIncItem, oDefItem, oBmpItem, oDlgItem, oIcoItem
local oMnuItem, oMnuString
DEFAULT cFileName := cGetFile( "XML files (*.xml) |*.xml| JSON files (*.json)", "Select a data file" )
if Empty( cFileName )
return nil
endif
oMruRCs:Save( cFileName )
oBtnSave:Disable()
DEFINE WINDOW oWndData TITLE cFileName MDICHILD
oTree = TTreeView():New( 2, 0, oWndData )
oTree:bChanged = { | oItem | oItem := oTree:GetSelected(),;
If( oItem != nil, oMemo:SetText( If( ! Empty( oItem:Cargo ), oItem:Cargo, "" ) ),) }
// oTree:bLDblClick = { || ShowItem( oTree:GetSelected() ) }
oTree:bRClicked = { | nRow, nCol | EditTree( nRow, nCol, oWndData, oTree ) }
oTree:SetImageList( oImageList )
oTree:nWidth += 48
@ 0, 25.7 GET oMemo VAR cItemText MEMO OF oWndData SIZE 300, 100 ;
ON CHANGE ( oBtnSave:Enable(), oMemo:Cargo := .T.,;
oTree:GetSelected():Cargo := cItemText )
oMemo:Cargo = .F. // it has not changed
@ 0, 200 SPLITTER oSplit ;
VERTICAL ;
PREVIOUS CONTROLS oTree ;
HINDS CONTROLS oMemo ;
SIZE 4, 200 PIXEL ;
OF oWndData
oSplit:AdjClient()
if ! Empty( cFileName )
cTxtFile = MemoRead( cFileName )
do case
case Upper( cFileExt( cFileName ) ) == "XML"
OpenXML( cFileName, oTree )
case Upper( cFileExt( cFileName ) ) == "JSON"
OpenJSON( cFileName, oTree )
endcase
endif
ACTIVATE WINDOW oWndData ;
ON RESIZE oSplit:AdjClient()
oWndData:bGotFocus = { || If( oMemo:Cargo, oBtnSave:Enable(), oBtnSave:Disable() ) }
return nil
//----------------------------------------------------------------------------//
function OpenXML( cFileName, oTree )
local aRoots := {}, hFile, oXmlDoc, oXmlIter, oTagLast, oTagActual
hFile = FOpen( cFileName )
oXmlDoc = TXmlDocument():New( hFile )
oXmlIter = TXmlIterator():New( oXmlDoc:oRoot )
AAdd( aRoots, oTree )
while ( oTagActual := oXmlIter:Next() ) != nil
if oTagLast != nil
if oTagLast:Depth() < oTagActual:Depth()
ASize( aRoots, Len( aRoots ) + 1 )
aRoots[ oTagActual:Depth() + 1 ] = aRoots[ oTagActual:Depth() ]:Add( oTagActual:cName )
aRoots[ oTagActual:Depth() + 1 ]:Cargo = oTagActual:cData
endif
if oTagLast:Depth() > oTagActual:Depth()
aRoots[ oTagActual:depth() + 1 ] = aRoots[ oTagActual:Depth() ]:Add( oTagActual:cName )
aRoots[ oTagActual:depth() + 1 ]:Cargo = oTagActual:cData
endif
if oTagLast:Depth() == oTagActual:Depth()
aRoots[ Max( oTagLast:Depth(), 1 ) ]:Add( oTagActual:cName ):Cargo = oTagActual:cData
endif
else
AAdd( aRoots, oTree:Add( oTagActual:cName ) )
ATail( aRoots ):Cargo = oTagActual:cData
endif
oTagLast = oTagActual
end
FClose( hFile )
return nil
//----------------------------------------------------------------------------//
function OpenJSON( cFileName )
return nil
//----------------------------------------------------------------------------//
function ShowImage( cBmp )
local oDlg, oBmp
DEFINE DIALOG oDlg TITLE cBmp
if Lower( Right( cBmp, 3 ) ) == "bmp"
@ 0, 0 BITMAP oBmp FILENAME cBmp OF oDlg NOBORDER
elseif Lower( Right( cBmp, 3 ) ) == "ico"
@ 0, 0 ICON oBmp FILENAME cBmp OF oDlg
endif
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oDlg:SetSize( Max( 300, oBmp:nWidth + 20 ),;
Max( 300, oBmp:nHeight + 20 ) ),;
oBmp:Center( oDlg ), oDlg:Center() )
return nil
//----------------------------------------------------------------------------//
function EditTree( nRow, nCol, oWndData, oTree )
local oPopup
MENU oPopup POPUP
MENUITEM "Add" ACTION If( oTree:GetSelected() != nil, ( oTree:GetSelected():oParent:Add( "new" ), oTree:Refresh() ),)
MENUITEM "Add child" ACTION If( oTree:GetSelected() != nil, ( oTree:GetSelected():Add( "new" ), oTree:Refresh() ),)
MENUITEM "Edit"
MENUITEM "Delete"
ENDMENU
ACTIVATE POPUP oPopup WINDOW oWndData AT nRow, nCol
return nil
//----------------------------------------------------------------------------//
static function GenDblClickBlock( oCtrl )
return { || MsgInfo( oCtrl:nId ) }
//----------------------------------------------------------------------------//
#ifndef __64__
1 24 "WinXP/WindowsXP.Manifest"
#endif
background BITMAP .\..\bitmaps\backgrnd\iosbg.bmp
New BITMAP "../bitmaps/32x32/new.bmp"
New2 BITMAP "../bitmaps/16x16/new.bmp"
Dialog BITMAP "../bitmaps/16x16/form.bmp"
DlgMask BITMAP "../bitmaps/16x16/frmmask.bmp"
Open BITMAP "../bitmaps/32x32/open.bmp"
Open2 BITMAP "../bitmaps/16x16/open.bmp"
Save BITMAP "../bitmaps/32x32/floppy.bmp"
Run BITMAP "../bitmaps/32x32/run.bmp"
Prg BITMAP "../bitmaps/32x32/source.bmp"
Exit BITMAP "../bitmaps/32x32/exit.bmp"
Exit2 BITMAP "../bitmaps/16x16/exit2.bmp"
includes BITMAP "../bitmaps/16x16/next.bmp"
incmask BITMAP "../bitmaps/16x16/nxtmask.bmp"
bitmap BITMAP "../bitmaps/16x16/bitmap.bmp"
bmpmask BITMAP "../bitmaps/16x16/bmpmask.bmp"
icon BITMAP "../bitmaps/16x16/icon.bmp"
icomask BITMAP "../bitmaps/16x16/icomask.bmp"
folder BITMAP "../bitmaps/16x16/folder.bmp"
fldmask BITMAP "../bitmaps/16x16/fldmask.bmp"
// FiveWin PIM (personal information manager)
#include "FiveWin.ch"
#include "Splitter.ch"
#include "xbrowse.ch"
static oWnd, oBtnSave, oImageList, oMruRCs
//----------------------------------------------------------------------------//
function Main()
local oBar, oMenuNew
local oBmpTiled
DEFINE BITMAP oBmpTiled RESOURCE "background"
DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 ;
TITLE FWVERSION + " PIM" ;
MENU BuildMenu() MDI
DEFINE BUTTONBAR oBar SIZE 70, 70 OF oWnd 2010
DEFINE BUTTON OF oBar PROMPT "New" ;
TOOLTIP "New" NOBORDER RESOURCE "New" ;
ACTION NewDataFile()
DEFINE BUTTON OF oBar PROMPT "Open" ;
TOOLTIP "Open" NOBORDER RESOURCE "Open" ;
ACTION OpenDataFile()
DEFINE BUTTON oBtnSave OF oBar PROMPT "Save" ;
TOOLTIP "Save" NOBORDER RESOURCE "Save" ACTION Save()
oBtnSave:Disable()
DEFINE BUTTON OF oBar GROUP PROMPT "Exit" ;
TOOLTIP "Exit" NOBORDER RESOURCE "Exit" ACTION oWnd:End()
oImageList = TImageList():New()
oImageList:Add( TBitmap():Define( "folder",, oWnd ),;
TBitmap():Define( "fldmask",, oWnd ) )
oImageList:Add( TBitmap():Define( "dialog",, oWnd ),;
TBitmap():Define( "dlgmask",, oWnd ) )
oImageList:Add( TBitmap():Define( "icon",, oWnd ),;
TBitmap():Define( "icomask",, oWnd ) )
oImageList:Add( TBitmap():Define( "bitmap",, oWnd ),;
TBitmap():Define( "bmpmask",, oWnd ) )
oImageList:Add( TBitmap():Define( "includes",, oWnd ),;
TBitmap():Define( "incmask",, oWnd ) )
DEFINE MSGBAR OF oWnd PROMPT "Personal Information Manager (c) FiveTech Software 2020" DATE KEYBOARD 2010
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT DrawTiled( hDC, oWnd, oBmpTiled )
// VALID MsgYesNo( "Want to end ?" )
oBmpTiled:End()
oImageList:End()
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&File"
MENU
MENUITEM "&New" RESOURCE "new2"
MENUITEM "&Open" RESOURCE "Open2" ;
ACTION OpenDataFile()
MENUITEM "&Save as..."
SEPARATOR
MENUITEM "Recent files"
MENU
MRU oMruRCs ;
FILENAME ".\re.ini" ; // .INI to manipulate. '\.' for local
SECTION "Recent RC files" ; // The name of the INI section
ACTION OpenDataFile( cMruItem ) ; // cMruItem is automatically provided
MESSAGE "Open this file" ; // The message for all of them
SIZE 10
ENDMENU
SEPARATOR
MENUITEM "&Exit..." ACTION oWnd:End() RESOURCE "Exit2"
ENDMENU
MENUITEM "&Edit"
oMenu:AddMDI()
oMenu:AddHelp( "FiveWin Resources Editor", "FiveTech 1993-2018" )
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function Save()
local oTreeView := oWnd:oWndActive:aControls[ 1 ]
local cText := "", cFileName := oWnd:oWndActive:GetText()
oTreeView:Scan( { | oItem, nItem | BuildXML( oItem, @cText, nItem ) } )
if File( cFileName )
if MsgYesNo( "Do you want to overwrite " + cFileName + " ?",;
cFileName + " already exists" )
hb_MemoWrit( cFileName, cText, .F. )
MsgInfo( cText )
endif
else
hb_MemoWrit( cFileName, cText,.F. )
endif
oBtnSave:Disable()
return nil
//----------------------------------------------------------------------------//
function BuildXML( oItem, cText, nItem )
if oItem:oParent != nil
cText += CRLF
endif
if oItem:oParent == nil .and. nItem == 1
if oItem:cPrompt != "xml"
oItem:Cargo = oItem:cPrompt
oItem:cPrompt = "xml"
cText += "<" + oItem:Cargo + ">"
endif
endif
if " " $ oItem:cPrompt
oItem:cPrompt = StrTran( oItem:cPrompt, " ", "_" )
endif
cText += "<" + If( ! Empty( oItem:cPrompt ), oItem:cPrompt, "" ) + ">"
if ! Empty( oItem:Cargo )
cText += oItem:Cargo
endif
if Len( oItem:aItems ) == 0
cText += "</" + If( ! Empty( oItem:cPrompt ), oItem:cPrompt, "" ) + ">"
endif
if oItem:oParent != nil .and. oItem:cPrompt != "xml"
if oItem == ATail( oItem:oParent:aItems )
cText += CRLF + "</" + oItem:oParent:cPrompt + ">"
endif
endif
return .F. // so it iterates the entire tree
//----------------------------------------------------------------------------//
function NewDataFile( cFileName )
local oWndData, oTree, oMemo, cItemText, oSplit
DEFAULT cFileName := cNewFileName( "new", "xml" )
DEFINE WINDOW oWndData TITLE cFileName MDICHILD
oTree = TTreeView():New( 2, 0, oWndData )
oTree:bChanged = { | oItem | oItem := oTree:GetSelected(),;
If( oItem != nil, oMemo:SetText( If( ! Empty( oItem:Cargo ), oItem:Cargo, "" ) ),) }
// oTree:bLDblClick = { || ShowItem( oTree:GetSelected() ) }
oTree:bRClicked = { | nRow, nCol | EditTree( nRow, nCol, oWndData, oTree ) }
oTree:SetImageList( oImageList )
oTree:nWidth += 48
if ! File( cFileName )
hb_MemoWrit( cFileName, '<xml>version="1.0"<new></new></xml>', .F. )
OpenXml( cFileName, oTree )
endif
@ 0, 25.7 GET oMemo VAR cItemText MEMO OF oWndData SIZE 300, 100 ;
ON CHANGE ( oBtnSave:Enable(), oMemo:Cargo := .T.,;
oTree:GetSelected():Cargo := cItemText )
oMemo:Cargo = .F. // it has not changed
@ 0, 200 SPLITTER oSplit ;
VERTICAL ;
PREVIOUS CONTROLS oTree ;
HINDS CONTROLS oMemo ;
SIZE 4, 200 PIXEL ;
OF oWndData
oSplit:AdjClient()
ACTIVATE WINDOW oWndData ;
ON RESIZE oSplit:AdjClient()
oWndData:bGotFocus = { || If( oMemo:Cargo, oBtnSave:Enable(), oBtnSave:Disable() ) }
return nil
//----------------------------------------------------------------------------//
function OpenDataFile( cFileName )
local cTxtFile, oTree
DEFAULT cFileName := cGetFile( "XML files (*.xml) |*.xml| JSON files (*.json)", "Select a data file" )
if Empty( cFileName )
return nil
endif
oMruRCs:Save( cFileName )
oBtnSave:Disable()
NewDataFile( cFileName )
oTree = oWnd:oWndActive:aControls[ 1 ]
if ! Empty( cFileName )
do case
case Upper( cFileExt( cFileName ) ) == "XML"
OpenXML( cFileName, oTree )
case Upper( cFileExt( cFileName ) ) == "JSON"
OpenJSON( cFileName, oTree )
endcase
endif
return nil
//----------------------------------------------------------------------------//
function OpenXML( cFileName, oTree )
local aRoots := {}, hFile, oXmlDoc, oXmlIter, oTagLast, oTagActual
hFile = FOpen( cFileName )
oXmlDoc = TXmlDocument():New( hFile )
oXmlIter = TXmlIterator():New( oXmlDoc:oRoot )
AAdd( aRoots, oTree )
while ( oTagActual := oXmlIter:Next() ) != nil
if oTagLast != nil
if oTagLast:Depth() < oTagActual:Depth()
ASize( aRoots, Len( aRoots ) + 1 )
aRoots[ oTagActual:Depth() + 1 ] = aRoots[ oTagActual:Depth() ]:Add( oTagActual:cName )
aRoots[ oTagActual:Depth() + 1 ]:Cargo = oTagActual:cData
endif
if oTagLast:Depth() > oTagActual:Depth()
aRoots[ oTagActual:depth() + 1 ] = aRoots[ oTagActual:Depth() ]:Add( oTagActual:cName )
aRoots[ oTagActual:depth() + 1 ]:Cargo = oTagActual:cData
endif
if oTagLast:Depth() == oTagActual:Depth()
aRoots[ Max( oTagLast:Depth(), 1 ) ]:Add( oTagActual:cName ):Cargo = oTagActual:cData
endif
else
AAdd( aRoots, oTree:Add( oTagActual:cName ) )
ATail( aRoots ):Cargo = oTagActual:cData
endif
oTagLast = oTagActual
end
FClose( hFile )
return nil
//----------------------------------------------------------------------------//
function OpenJSON( cFileName )
return nil
//----------------------------------------------------------------------------//
function ShowImage( cBmp )
local oDlg, oBmp
DEFINE DIALOG oDlg TITLE cBmp
if Lower( Right( cBmp, 3 ) ) == "bmp"
@ 0, 0 BITMAP oBmp FILENAME cBmp OF oDlg NOBORDER
elseif Lower( Right( cBmp, 3 ) ) == "ico"
@ 0, 0 ICON oBmp FILENAME cBmp OF oDlg
endif
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oDlg:SetSize( Max( 300, oBmp:nWidth + 20 ),;
Max( 300, oBmp:nHeight + 20 ) ),;
oBmp:Center( oDlg ), oDlg:Center() )
return nil
//----------------------------------------------------------------------------//
function EditTree( nRow, nCol, oWndData, oTree )
local oPopup, cPrompt
MENU oPopup POPUP
MENUITEM "Add" ACTION If( oTree:GetSelected() != nil,;
( oTree:GetSelected():oParent:Add( "new" ), oTree:Refresh() ),;
( oTree:Add( "new" ), oTree:Refresh(), oBtnSave:Enable() ) )
MENUITEM "Add child" ACTION If( oTree:GetSelected() != nil,;
( oTree:GetSelected():Add( "new" ), oTree:Refresh(), oBtnSave:Enable() ),)
MENUITEM "Edit" ACTION ( cPrompt := PadR( oTree:GetSelected():cPrompt, 30 ),;
If( MsgGet( "Edit", "item prompt", @cPrompt ),;
( oTree:GetSelected():cPrompt := AllTrim( cPrompt ), oBtnSave:Enable() ),) )
MENUITEM "Delete" ACTION If( oTree:GetSelected() != nil,;
( oTree:GetSelected():End(), oTree:Refresh(), oBtnSave:Enable() ),)
ENDMENU
ACTIVATE POPUP oPopup WINDOW oWndData AT nRow, nCol
return nil
//----------------------------------------------------------------------------//
static function GenDblClickBlock( oCtrl )
return { || MsgInfo( oCtrl:nId ) }
//----------------------------------------------------------------------------//
< ?xml version = "1.0" encoding = "ISO-8859-1" ? >
<ROOT RPT="ripara" DESCRIPCION="scheda">
<Modulo>
<Structure>
<Field>
<Field_name>REPORTNUM</Field_name>
<Field_type>Character</Field_type>
<Field_length> 3</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>MODELLO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 25</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>DESC</Field_name>
<Field_type>Character</Field_type>
<Field_length> 60</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>FORMATO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 15</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>LARGHEZZA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>ALTEZZA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>ORIZONTALE</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>OFFSETX</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>OFFSETY</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>BODYINIT</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>ENDBODY</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>INTERLINEA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>RIGHE</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 2</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>COLONNE</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 2</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>GUTTER</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGINSUP</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGININF</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGINSIN</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGINDES</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>IMGFRONTE</Field_name>
<Field_type>Character</Field_type>
<Field_length> 60</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>IMGRETRO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 60</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>MARGINFRO</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGINGRET</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
</Structure>
<Data>
<Record>
<REPORTNUM>001</REPORTNUM>
<MODELLO>Scheda di riparazione
</MODELLO>
<DESC>Scheda di riparazione
</DESC>
<FORMATO>A4</FORMATO>
<LARGHEZZA>21.00</LARGHEZZA>
<ALTEZZA>29.70</ALTEZZA>
<ORIZONTALE>False</ORIZONTALE>
<OFFSETX>0.00</OFFSETX>
<OFFSETY>0.00</OFFSETY>
<BODYINIT>0.00</BODYINIT>
<ENDBODY>0.00</ENDBODY>
<INTERLINEA>0.00</INTERLINEA>
<RIGHE>0</RIGHE>
<COLONNE>0</COLONNE>
<GUTTER>0.00</GUTTER>
<MARGINSUP>0.00</MARGINSUP>
<MARGININF>0.00</MARGININF>
<MARGINSIN>0.00</MARGINSIN>
<MARGINDES>0.00</MARGINDES>
<IMGFRONTE>.\images\Chrysanthemum.jpg</IMGFRONTE>
<IMGRETRO>.\images\Lighthouse.jpg</IMGRETRO>
<MARGINFRO>4.00</MARGINFRO>
<MARGINGRET>7.00</MARGINGRET>
</Record>
</Data>
</Modulo>
<RigheModulo>
<Structure>
<Field>
<Field_name>TIPO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 1</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>TESTO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 40</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>CAMPO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>RIGA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>COLONNA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>LARGHEZZA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>ALTEZZA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>BORDO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>COLORBORDO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 20</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>TIPOBORDO</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 1</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>ANGLBORDER</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>BACKBORDO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 20</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>CARATTERE</Field_name>
<Field_type>Character</Field_type>
<Field_length> 20</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>SIZEFONT</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 2</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>ALLINEA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 1</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>POSIZIONE</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 1</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>GRASSETTO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>CORSIVO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>BARRATO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>SOTTOLINE</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>COLORFONT</Field_name>
<Field_type>Character</Field_type>
<Field_length> 20</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>SPOSTARIGA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>SPOSTACOLO</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>REPORTNUM</Field_name>
<Field_type>Character</Field_type>
<Field_length> 3</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
</Structure>
<Data>
<Record>
<TIPO>T</TIPO>
<TESTO></TESTO>
<CAMPO>False</CAMPO>
<RIGA>1.00</RIGA>
<COLONNA>11.00</COLONNA>
<LARGHEZZA>20.00</LARGHEZZA>
<ALTEZZA>0.01</ALTEZZA>
<BORDO>True</BORDO>
<COLORBORDO>black</COLORBORDO>
<TIPOBORDO>1</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO></BACKBORDO>
<CARATTERE>Arial</CARATTERE>
<SIZEFONT>6</SIZEFONT>
<ALLINEA>1</ALLINEA>
<POSIZIONE>1</POSIZIONE>
<GRASSETTO>False</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT></COLORFONT>
<SPOSTARIGA>0.04</SPOSTARIGA>
<SPOSTACOLO>0.03</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>T</TIPO>
<TESTO>Intestatario</TESTO>
<CAMPO>False</CAMPO>
<RIGA>1.00</RIGA>
<COLONNA>11.00</COLONNA>
<LARGHEZZA>13.00</LARGHEZZA>
<ALTEZZA>0.40</ALTEZZA>
<BORDO>True</BORDO>
<COLORBORDO>black</COLORBORDO>
<TIPOBORDO>1</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>black</BACKBORDO>
<CARATTERE>Arial</CARATTERE>
<SIZEFONT>6</SIZEFONT>
<ALLINEA>1</ALLINEA>
<POSIZIONE>3</POSIZIONE>
<GRASSETTO>True</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT>white</COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>T</TIPO>
<TESTO>Tipo Documento</TESTO>
<CAMPO>False</CAMPO>
<RIGA>5.50</RIGA>
<COLONNA>1.00</COLONNA>
<LARGHEZZA>5.50</LARGHEZZA>
<ALTEZZA>0.80</ALTEZZA>
<BORDO>True</BORDO>
<COLORBORDO>black</COLORBORDO>
<TIPOBORDO>1</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>gray</BACKBORDO>
<CARATTERE>Arial</CARATTERE>
<SIZEFONT>6</SIZEFONT>
<ALLINEA>1</ALLINEA>
<POSIZIONE>1</POSIZIONE>
<GRASSETTO>False</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT>white</COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>T</TIPO>
<TESTO>Numero Documento</TESTO>
<CAMPO>False</CAMPO>
<RIGA>5.50</RIGA>
<COLONNA>5.50</COLONNA>
<LARGHEZZA>7.80</LARGHEZZA>
<ALTEZZA>0.80</ALTEZZA>
<BORDO>True</BORDO>
<COLORBORDO>black</COLORBORDO>
<TIPOBORDO>1</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>gray</BACKBORDO>
<CARATTERE>Arial</CARATTERE>
<SIZEFONT>6</SIZEFONT>
<ALLINEA>1</ALLINEA>
<POSIZIONE>1</POSIZIONE>
<GRASSETTO>True</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT>white</COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>I</TIPO>
<TESTO>fondo.jpg</TESTO>
<CAMPO>False</CAMPO>
<RIGA>1.00</RIGA>
<COLONNA>1.00</COLONNA>
<LARGHEZZA>20.00</LARGHEZZA>
<ALTEZZA>29.00</ALTEZZA>
<BORDO>False</BORDO>
<COLORBORDO></COLORBORDO>
<TIPOBORDO>0</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>gray</BACKBORDO>
<CARATTERE></CARATTERE>
<SIZEFONT>0</SIZEFONT>
<ALLINEA>0</ALLINEA>
<POSIZIONE>0</POSIZIONE>
<GRASSETTO>False</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT></COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>I</TIPO>
<TESTO>logoditta.bmp</TESTO>
<CAMPO>False</CAMPO>
<RIGA>1.15</RIGA>
<COLONNA>1.10</COLONNA>
<LARGHEZZA>8.00</LARGHEZZA>
<ALTEZZA>2.00</ALTEZZA>
<BORDO>False</BORDO>
<COLORBORDO></COLORBORDO>
<TIPOBORDO>0</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>gray</BACKBORDO>
<CARATTERE></CARATTERE>
<SIZEFONT>0</SIZEFONT>
<ALLINEA>0</ALLINEA>
<POSIZIONE>0</POSIZIONE>
<GRASSETTO>False</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT></COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
</Data>
</RigheModulo>
</ROOT>
Otto wrote:C:\_DEL ohne Rückfrage\xmltestz.xml (2:2) Critical Ein Name darf nicht mit dem Zeichen ' ', hexadezimaler Wert 0x20, beginnen. Zeile 2, Position 2.
Silvio, please delete the space in this line.
<?xml version = "1.0" encoding = "ISO-8859-1" ?>
Best regards,
Otto
#include "FiveWin.ch"
#include "fileio.ch"
#include "hbxml.ch"
#INCLUDE "FILEIO.CH"
function xml2dbf( nActual, cXMLFile )
local oXmlDoc := TXmlDocument():New( cXMLFile )
local oXmlIter := TXmlIterator():New( oXmlDoc:oRoot ), oTagActual
local nDepth
local cStart := ""
local cEnde := ""
*----------------------------------------------------------
ferase("xml2.log")
while .T.
oTagActual = oXmlIter:Next()
if oTagActual != nil
nDepth = oTagActual:Depth()
if oTagActual:cName = "RoomType" .and. .not. oTagActual:cName = "RoomTypes"
select onlinestand
APPEND_BLANK()
rlok()
HEval( oTagActual:aAttributes, { | cKey, cValue | logfile( "xml2.log", { ,cKey, cValue } ),;
iif( cKey = "RoomID", ( onlinestand->RoomType := cValue ) , ),;
iif( cKey = "NumberOfUnits", (onlinestand->Units := cValue ) , ),;
iif( cKey = "Quantity", (onlinestand->Quantity := cValue ) , ) } )
unlok()
endif
if oTagActual:cName = "TimeSpan"
rlok()
HEval( oTagActual:aAttributes, { | cKey, cValue | logfile( "xml2.log", { ,cKey, cValue } ),;
iif( cKey = "Start", ( onlinestand->Start := cValue ) , ),;
iif( cKey = "End", ( onlinestand->End := cValue ) , ) } )
endif
unlok()
else
exit
endif
end
*----------------------------------------------------------
return nil
//----------------------------------------------------------------------------//
Antonio Linares wrote:D.
> Ah, so you guys are working on something like this?
We have used another FWH example to adapt it. We always wanted to have a tool like this one, too
> Ok thanks, I'll hold off and I'll check back periodically, and stay subscribed to FTDN.
We have included this pim.prg new example in FWH examples for next FWH build. many thanks
> Btw, do you send out notifications when our FTDN has to be renewed?
Sometimes
#include "FiveWin.ch"
#include "Splitter.ch"
static oSplit1, oSplit2, oLbxDatas, oLbxMethods
//----------------------------------------------------------------------------/
function Test()
local oWnd
DEFINE WINDOW oWnd TITLE "XML viewer" ;
MENU BuildMenu()
ACTIVATE WINDOW oWnd ;
ON INIT BuildTree( oWnd ) ;
ON RESIZE ( If( oSplit1 != nil, oSplit1:AdjLeft(),),;
If( oSplit2 != nil, oSplit2:AdjRight(),) )
return nil
//----------------------------------------------------------------------------/
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "About" ACTION MsgAbout( "XML Viewer", "(c) FiveTech Software 2013" )
ENDMENU
return oMenu
//----------------------------------------------------------------------------/
function BuildTree( oWnd )
local oTree := TTreeView():New( 0, 0, oWnd )
local oClass, cData, cMethod
local hFile, oXmlDoc, oXmlIter, oTagActual
local oTagLast, aRoots := {}
oTree:nWidth = 180
// oTree:SetImageList( oImageList )
oTree:Expand()
@ 0, 186 LISTBOX oLbxDatas VAR cData ITEMS {} ;
SIZE 200, 200 PIXEL OF oWnd
@ 0, 391 LISTBOX oLbxMethods VAR cMethod ITEMS {} ;
SIZE 200, 200 PIXEL OF oWnd
@ 0, 181 SPLITTER oSplit1 ;
VERTICAL ;
PREVIOUS CONTROLS oTree ;
HINDS CONTROLS oLbxDatas ;
LEFT MARGIN 150 ;
RIGHT MARGIN oSplit2:nLast + 100 ;
SIZE 4, 300 PIXEL ;
OF oWnd STYLE
@ 0, 386 SPLITTER oSplit2 ;
VERTICAL ;
PREVIOUS CONTROLS oLbxDatas ;
HINDS CONTROLS oLbxMethods ;
LEFT MARGIN oSplit1:nFirst + 120 ;
RIGHT MARGIN 80 ;
SIZE 4, 300 PIXEL ;
OF oWnd STYLE
hFile = FOpen( "test.xml" )
oXmlDoc = TXmlDocument():New( hFile )
oXmlIter = TXmlIterator():New( oXmlDoc:oRoot )
AAdd( aRoots, oTree )
while ( oTagActual := oXmlIter:Next() ) != nil
if oTagLast != nil
if oTagLast:Depth() < oTagActual:Depth()
ASize( aRoots, Len( aRoots ) + 1 )
aRoots[ oTagActual:Depth() + 1 ] = aRoots[ oTagActual:Depth() ]:Add( oTagActual:cName )
aRoots[ oTagActual:Depth() + 1 ]:Cargo = oTagActual
endif
if oTagLast:Depth() > oTagActual:Depth()
aRoots[ oTagActual:Depth() + 1 ] = aRoots[ oTagActual:Depth() ]:Add( oTagActual:cName )
aRoots[ oTagActual:Depth() + 1 ]:Cargo = oTagActual
endif
if oTagLast:Depth() == oTagActual:Depth()
aRoots[ oTagActual:Depth() + 1 ] = aRoots[ Max( oTagLast:Depth(), 1 ) ]:Add( oTagActual:cName )
aRoots[ oTagActual:Depth() + 1 ]:Cargo = oTagActual
endif
else
AAdd( aRoots, oTree:Add( oTagActual:cName ) )
ATail( aRoots ):Cargo = oTagActual
endif
oTagLast = oTagActual
end
FClose( hFile )
oTree:bChanged = { | oItem | ChangeItem( oItem ) }
return nil
//----------------------------------------------------------------------------//
function ChangeItem( oItem )
if ! Empty( oItem:GetSelected():Cargo )
oLbxDatas:SetItems( { oItem:GetSelected():Cargo:cData } )
endif
oLbxMethods:Reset()
if ! Empty( oItem:GetSelected():Cargo:aAttributes )
HEval( oItem:GetSelected():Cargo:aAttributes,;
{ | cKey, cData | oLbxMethods:Add( cKey + " : " + cData ) } )
endif
return nil
//----------------------------------------------------------------------------//
Silvio.Falconi wrote:When I load a file created not read good
Please try it
- Code: Select all Expand view RUN
< ?xml version = "1.0" encoding = "ISO-8859-1" ? >
<ROOT RPT="ripara" DESCRIPCION="scheda">
<Modulo>
<Structure>
<Field>
<Field_name>REPORTNUM</Field_name>
<Field_type>Character</Field_type>
<Field_length> 3</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>MODELLO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 25</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>DESC</Field_name>
<Field_type>Character</Field_type>
<Field_length> 60</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>FORMATO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 15</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>LARGHEZZA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>ALTEZZA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>ORIZONTALE</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>OFFSETX</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>OFFSETY</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>BODYINIT</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>ENDBODY</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>INTERLINEA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>RIGHE</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 2</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>COLONNE</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 2</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>GUTTER</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGINSUP</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGININF</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGINSIN</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGINDES</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>IMGFRONTE</Field_name>
<Field_type>Character</Field_type>
<Field_length> 60</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>IMGRETRO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 60</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>MARGINFRO</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>MARGINGRET</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
</Structure>
<Data>
<Record>
<REPORTNUM>001</REPORTNUM>
<MODELLO>Scheda di riparazione
</MODELLO>
<DESC>Scheda di riparazione
</DESC>
<FORMATO>A4</FORMATO>
<LARGHEZZA>21.00</LARGHEZZA>
<ALTEZZA>29.70</ALTEZZA>
<ORIZONTALE>False</ORIZONTALE>
<OFFSETX>0.00</OFFSETX>
<OFFSETY>0.00</OFFSETY>
<BODYINIT>0.00</BODYINIT>
<ENDBODY>0.00</ENDBODY>
<INTERLINEA>0.00</INTERLINEA>
<RIGHE>0</RIGHE>
<COLONNE>0</COLONNE>
<GUTTER>0.00</GUTTER>
<MARGINSUP>0.00</MARGINSUP>
<MARGININF>0.00</MARGININF>
<MARGINSIN>0.00</MARGINSIN>
<MARGINDES>0.00</MARGINDES>
<IMGFRONTE>.\images\Chrysanthemum.jpg</IMGFRONTE>
<IMGRETRO>.\images\Lighthouse.jpg</IMGRETRO>
<MARGINFRO>4.00</MARGINFRO>
<MARGINGRET>7.00</MARGINGRET>
</Record>
</Data>
</Modulo>
<RigheModulo>
<Structure>
<Field>
<Field_name>TIPO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 1</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>TESTO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 40</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>CAMPO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>RIGA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>COLONNA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>LARGHEZZA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>ALTEZZA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>BORDO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>COLORBORDO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 20</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>TIPOBORDO</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 1</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>ANGLBORDER</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>BACKBORDO</Field_name>
<Field_type>Character</Field_type>
<Field_length> 20</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>CARATTERE</Field_name>
<Field_type>Character</Field_type>
<Field_length> 20</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>SIZEFONT</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 2</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>ALLINEA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 1</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>POSIZIONE</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 1</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>GRASSETTO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>CORSIVO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>BARRATO</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>SOTTOLINE</Field_name>
<Field_type>Logical</Field_type>
</Field>
<Field>
<Field_name>COLORFONT</Field_name>
<Field_type>Character</Field_type>
<Field_length> 20</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
<Field>
<Field_name>SPOSTARIGA</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>SPOSTACOLO</Field_name>
<Field_type>Numeric</Field_type>
<Field_length> 5</Field_length>
<Field_decimals> 2</Field_decimals>
</Field>
<Field>
<Field_name>REPORTNUM</Field_name>
<Field_type>Character</Field_type>
<Field_length> 3</Field_length>
<Field_decimals> 0</Field_decimals>
</Field>
</Structure>
<Data>
<Record>
<TIPO>T</TIPO>
<TESTO></TESTO>
<CAMPO>False</CAMPO>
<RIGA>1.00</RIGA>
<COLONNA>11.00</COLONNA>
<LARGHEZZA>20.00</LARGHEZZA>
<ALTEZZA>0.01</ALTEZZA>
<BORDO>True</BORDO>
<COLORBORDO>black</COLORBORDO>
<TIPOBORDO>1</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO></BACKBORDO>
<CARATTERE>Arial</CARATTERE>
<SIZEFONT>6</SIZEFONT>
<ALLINEA>1</ALLINEA>
<POSIZIONE>1</POSIZIONE>
<GRASSETTO>False</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT></COLORFONT>
<SPOSTARIGA>0.04</SPOSTARIGA>
<SPOSTACOLO>0.03</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>T</TIPO>
<TESTO>Intestatario</TESTO>
<CAMPO>False</CAMPO>
<RIGA>1.00</RIGA>
<COLONNA>11.00</COLONNA>
<LARGHEZZA>13.00</LARGHEZZA>
<ALTEZZA>0.40</ALTEZZA>
<BORDO>True</BORDO>
<COLORBORDO>black</COLORBORDO>
<TIPOBORDO>1</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>black</BACKBORDO>
<CARATTERE>Arial</CARATTERE>
<SIZEFONT>6</SIZEFONT>
<ALLINEA>1</ALLINEA>
<POSIZIONE>3</POSIZIONE>
<GRASSETTO>True</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT>white</COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>T</TIPO>
<TESTO>Tipo Documento</TESTO>
<CAMPO>False</CAMPO>
<RIGA>5.50</RIGA>
<COLONNA>1.00</COLONNA>
<LARGHEZZA>5.50</LARGHEZZA>
<ALTEZZA>0.80</ALTEZZA>
<BORDO>True</BORDO>
<COLORBORDO>black</COLORBORDO>
<TIPOBORDO>1</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>gray</BACKBORDO>
<CARATTERE>Arial</CARATTERE>
<SIZEFONT>6</SIZEFONT>
<ALLINEA>1</ALLINEA>
<POSIZIONE>1</POSIZIONE>
<GRASSETTO>False</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT>white</COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>T</TIPO>
<TESTO>Numero Documento</TESTO>
<CAMPO>False</CAMPO>
<RIGA>5.50</RIGA>
<COLONNA>5.50</COLONNA>
<LARGHEZZA>7.80</LARGHEZZA>
<ALTEZZA>0.80</ALTEZZA>
<BORDO>True</BORDO>
<COLORBORDO>black</COLORBORDO>
<TIPOBORDO>1</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>gray</BACKBORDO>
<CARATTERE>Arial</CARATTERE>
<SIZEFONT>6</SIZEFONT>
<ALLINEA>1</ALLINEA>
<POSIZIONE>1</POSIZIONE>
<GRASSETTO>True</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT>white</COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>I</TIPO>
<TESTO>fondo.jpg</TESTO>
<CAMPO>False</CAMPO>
<RIGA>1.00</RIGA>
<COLONNA>1.00</COLONNA>
<LARGHEZZA>20.00</LARGHEZZA>
<ALTEZZA>29.00</ALTEZZA>
<BORDO>False</BORDO>
<COLORBORDO></COLORBORDO>
<TIPOBORDO>0</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>gray</BACKBORDO>
<CARATTERE></CARATTERE>
<SIZEFONT>0</SIZEFONT>
<ALLINEA>0</ALLINEA>
<POSIZIONE>0</POSIZIONE>
<GRASSETTO>False</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT></COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
<Record>
<TIPO>I</TIPO>
<TESTO>logoditta.bmp</TESTO>
<CAMPO>False</CAMPO>
<RIGA>1.15</RIGA>
<COLONNA>1.10</COLONNA>
<LARGHEZZA>8.00</LARGHEZZA>
<ALTEZZA>2.00</ALTEZZA>
<BORDO>False</BORDO>
<COLORBORDO></COLORBORDO>
<TIPOBORDO>0</TIPOBORDO>
<ANGLBORDER>False</ANGLBORDER>
<BACKBORDO>gray</BACKBORDO>
<CARATTERE></CARATTERE>
<SIZEFONT>0</SIZEFONT>
<ALLINEA>0</ALLINEA>
<POSIZIONE>0</POSIZIONE>
<GRASSETTO>False</GRASSETTO>
<CORSIVO>False</CORSIVO>
<BARRATO>False</BARRATO>
<SOTTOLINE>False</SOTTOLINE>
<COLORFONT></COLORFONT>
<SPOSTARIGA>0.00</SPOSTARIGA>
<SPOSTACOLO>0.00</SPOSTACOLO>
<REPORTNUM>001</REPORTNUM>
</Record>
</Data>
</RigheModulo>
</ROOT>
Antonio Linares wrote:Class TXmlDocument() provides XML error detection support, so we have already included it:
https://github.com/FiveTechSoft/FWH_tools/blob/master/pim.zip
Silvio, now you can check the error in your XML file! Anyhow, we get the error description but no idea what the error is yet
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 70 guests