| 186 | } |
| 187 | |
| 188 | def parse_relationship_xml(self, project): |
| 189 | for relationship in project.findall("pr:Relationship", self.ns): |
| 190 | predecessor = relationship.find("pr:PredecessorActivityObjectId", self.ns).text |
| 191 | successor = relationship.find("pr:SuccessorActivityObjectId", self.ns).text |
| 192 | if predecessor not in self.activities or successor not in self.activities: |
| 193 | continue |
| 194 | self.relationships[relationship.find("pr:ObjectId", self.ns).text] = { |
| 195 | "PredecessorActivity": predecessor, |
| 196 | "SuccessorActivity": successor, |
| 197 | "Type": self.sequence_type_map[relationship.find("pr:Type", self.ns).text], |
| 198 | "Lag": relationship.find("pr:Lag", self.ns).text, |
| 199 | } |
| 200 | |
| 201 | def get_wbs(self, wbs): |
| 202 | return {"Name": wbs.find("pr:Name", self.ns).text, "subtasks": []} |