LDIF Parser (C #)

I am looking for an LDIF parser for C #. I am trying to parse an LDIF file so that I can verify that objects do not exist before they are added. Adding them when they already exist using ntdsSchemaAdd) causes an error log entry.

+4
source share
2 answers

A quick web search showed: http://wiki.github.com/skradel/Zetetic.Ldap/ . They provided API.net.

On the page:

Zetetic.Ldap is a .NET library for .NET 2 and higher, which makes it easier to work with directory servers (for example, Active Directory, ADAM, Red Hat Directory Server and others). Some of the key features of Zetetic.Ldap are:

Parsing and generating files 1.LDIF - reading and writing the file format used to move data between the directory system

2.LDAP Entry-Oriented Change Tracking API - creating and modifying an object catalog in a more natural way

3.LDAP schema polling - server understands fast programmatic access to types of objects and fields of your catalog. Find Out Attribute is a string, number, date, etc., without a lot of leadership research and reanalysis

4.LDIF Pivoter - turn the LDIF file into a (with a comma or tab delimiter) file for analysis or loading into systems that do not speak LDIF We built the Zetetic.Ldap libraries to create directory projects and programming faster and easier, and release it here in hoping others find it useful too. To our knowledge, this is the only .NET library that really understands the LDIF specification.

Download link: http://github.com/downloads/skradel/Zetetic.Ldap/Zetetic.Ldap_20090831.zip

+4
source

I myself would take it apart.

If you look at the LDIF RFC for EBNF, you will see that this is not a very complicated grammar.

I analyzed a large number of LDIFs before using Regexes reliably. Although your mileage may vary.

+1
source

Source: https://habr.com/ru/post/1301401/


All Articles