Class PrimaveraXmlReader

PrimaveraXmlReader class

Represents a reader which allows to retrieve Project UIDs from Primavera Xml file.

public class PrimaveraXmlReader : PrimaveraBaseReader

Constructors

NameDescription
PrimaveraXmlReader(Stream)Initializes a new instance of the PrimaveraXmlReader class.
PrimaveraXmlReader(string)Initializes a new instance of the PrimaveraXmlReader class.

Methods

NameDescription
GetProjectInfos()Return a list of the project’s short info objects.
GetProjectUids()Return a list of the projects’ unique identifiers.
LoadProject(int)Loads the project with the specified unique identifier.

Examples

Shows how to examine short projects’ info from a Primavera XML file.

var reader = new PrimaveraXmlReader(DataDir + "MultiprojectWithExternal.xml");
var projectInfos = reader.GetProjectInfos();
foreach (var info in projectInfos)
{
    Console.WriteLine("{0} - '{1}' - {2}", info.Uid, info.Name, info.ExportFlag);
}

See Also