PDIParserParseFile Method

This method is used to parse one or more PDI objects from the specified file or URL

Definition

Namespace: EWSoftware.PDI.Parser
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2023.1.2.0
public void ParseFile(
	string filename
)

Parameters

filename  String
The name of the file from which to read the PDI objects. This can be a standard filename or a URL that starts with "file://", "http://", or "https://".

Remarks

The derived class will build a list of objects based on the data stream. See the derived classes for more information. The named file will be opened, its entire content parsed, and then it will be closed.

Example

C#
VCardParser vcp = new VCardParser();
vcp.ParseFile(@"C:\AddressBook.vcf");
//Or vcp.ParseFile("http://www.mydomain.com/vCards/AddressBook.vcf");

VCardCollection vCards = vcp.VCards;

Exceptions

ArgumentNullExceptionThis is thrown if the specified filename string is null or empty.
PDIParserExceptionThis is thrown if there is an error parsing the data stream. Inner exceptions may contain additional information about the cause of the error.

See Also