Le forum (ô combien francophone) des utilisateurs de Powerbuilder.
Salut à tous,
J'ai un fichier texte comme input dans notre application, et je voulais le parser. Comment faire ?
merci pour vos réponses
Dernière modification par mattdamon (14-03-2008 15:04:27)
Hors ligne
File Functions
You use the file functions to open text and blob files and to read and write to the files from PowerBuilder. You can open the files in line mode or stream mode:
In line mode, the file is read a line at a time (until a carriage return (CR), line feed (LF), or end of file (EOF) is encountered) and a CR or LF is appended to the end of each write to the file.
In stream mode, the entire file is read (until an EOF is encountered) and no CR or LF is appended when you write to the file.
Tip You usually use stream mode to read an entire file into a MultiLineEdit and then write it out after it has been modified.
When you open a file, PowerBuilder assigns it a unique integer and sets the position pointer for the file to the position you specify (the beginning or end of the file). You use the integer to identify the file when you want to read the file, write to it, or close it. The position pointer defines where the next read or write will begin and PowerBuilder advances the pointer automatically after each read or write.
Use this function To
ChangeDirectory Change directory
CreateDirectory Create a directory
DirectoryExists Determine if a named directory exists
FileClose Close a file
FileCopy Copy a file
FileDelete Delete a file
FileExists Determine whether a file exists
FileEncoding Determines the encoding of a file
FileLength Obtain the length of a file whose size is less than 2GB
FileLength64 Obtain the length of a file of any size
FileMove Move a file
FileOpen Open a file
FileRead, FileReadEx Read a file
FileSeek Seek to a position in a file whose size is less than 2GB
FileSeek64 Seek to a position in a file of any size
FileWrite, FileWriteEx Write to a file.
GetCurrentDirectory Get the name of the current directory
GetFileOpenName Display Open File dialog.
GetFileSaveName Display Save File dialog.
RemoveDirectory Remove a directory
Hors ligne
Bonjour,
est ce que possible d'utiliser PBDOM pour parser mon fichier texte (n'est pas de XML)
Hors ligne
et non...
About PBDOM
PBDOM is the PowerBuilder implementation of the Document Object Model (DOM), a programming interface defining the means by which XML documents can be accessed and manipulated.
...
Hors ligne