Répétez apres moi :J'aime PBAdonf. J'aime PBAdonf. J'aime PBAdonf.

Le forum (ô combien francophone) des utilisateurs de Powerbuilder.

Recherche rapide

Annonce

Certaines rubriques, dont des cours, sont uniquement visibles par les membres du forum ^^.
Dans la rubrique Liens & Références, vous avez accès à un sommaire de téléchargement, profitez-en !
Il existe maintenant un nouveau TOPIC "Votre CV en Ligne" accessible uniquement par demande.

#1 29-02-2008 22:13:27

mattdamon  
Le Tuniso-Parisien
Lieu: Livry-Gargan 93190
Date d'inscription: 29-12-2007
Messages: 569
Pépites: 89
Banque: 77,512,666,613,392,940

[RESOLU] Parsing fichier texte

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

 

#2 01-03-2008 07:50:36

erasorz  
Admin
Lieu: Babylone
Date d'inscription: 23-11-2006
Messages: 5121
Pépites: 97,197
Banque: 2,147,483,647

Re: [RESOLU] Parsing fichier texte




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


N'envoyez jamais un humain faire le travail d'un programme.

Hors ligne

 

#3 01-03-2008 13:52:40

mattdamon  
Le Tuniso-Parisien
Lieu: Livry-Gargan 93190
Date d'inscription: 29-12-2007
Messages: 569
Pépites: 89
Banque: 77,512,666,613,392,940

Re: [RESOLU] Parsing fichier texte

Bonjour,

est ce que possible d'utiliser PBDOM pour parser mon fichier texte (n'est pas de XML)

Hors ligne

 

#4 01-03-2008 14:17:26

erasorz  
Admin
Lieu: Babylone
Date d'inscription: 23-11-2006
Messages: 5121
Pépites: 97,197
Banque: 2,147,483,647

Re: [RESOLU] Parsing fichier texte

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.

...


N'envoyez jamais un humain faire le travail d'un programme.

Hors ligne

 

Pied de page des forums

Propulsé par FluxBB 1.2.22