====== XPaths ======
Author : Brian Coffey
\\ Date : 2017-02-01
===== XPath Overview =====
Xpaths are a powerful method of extracting information from an incoming XML message.
NOTE that tML-Base and tML-TA are replaced in the code as Xpath does not work well with messages like "namespace:tag".
The CustomerMessage domain has many CustomerMessageMappings. These CustomerMessageMappings contain customer XPaths which are used to store the location of a particular value within the message e.g premises_access_person is located at 'ModifyRequest/ALocationAccessPerson/Name' within the XML incoming modify request message.
One thing to note on the Xpath location, the message name eg. ModifyAttributesRequest is not needed as this is contained in the parent CustomerMessage.
Once this data is obtained using the XPath it is stored in an incomingInformationMap under the Errigal key for that particular CustomerMessageMapping
===== XPath Examples =====
=== Sample Incoming Message ===
<?xml version="1.0"?>
<tML-TA:ModifyAttributesRequest xsi:schemaLocation="http://www.ansi.org/tML/TA/tML-TAtML-TA.xsd" xmlns="http://www.ansi.org/tML/TA/tML-TA" xmlns:tML-TABase="http://www.ansi.org/tML/TA/tML-TABase" xmlns:tmlta="http://www.ansi.org/tML/TA/tML-TA" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tML-TA:RequestId>123</tML-TA:RequestId>
<tML-TA:Customer>
<tML-TABase:UserId>EXT-M</tML-TABase:UserId>
<tML-TABase:ServiceProfile>Service Profile</tML-TABase:ServiceProfile>
</tML-TA:Customer>
<tML-TA:TargetObjectName>
<tML-TABase:DistinguishedName>
<tML-TABase:RDNSequenceItem>
<tML-TABase:Type>networkID</tML-TABase:Type>
<tML-TABase:Assertion>EXT</tML-TABase:Assertion>
</tML-TABase:RDNSequenceItem>
<tML-TABase:RDNSequenceItem>
<tML-TABase:Type>accountName</tML-TABase:Type>
<tML-TABase:Assertion>EXT-M</tML-TABase:Assertion>
</tML-TABase:RDNSequenceItem>
<tML-TABase:RDNSequenceItem>
<tML-TABase:Type>troubleReportID</tML-TABase:Type>
<tML-TABase:Assertion>485689</tML-TABase:Assertion>
</tML-TABase:RDNSequenceItem>
</tML-TABase:DistinguishedName>
</tML-TA:TargetObjectName>
<tML-TA:TroubleReportId>485689</tML-TA:TroubleReportId>
<tML-TA:ModifyRequest>
<tML-TABase:AdditionalTroubleInfoList>
<tML-TABase:AdditionalTroubleInfoItem>TEST</tML-TABase:AdditionalTroubleInfoItem>
</tML-TABase:AdditionalTroubleInfoList>
</tML-TA:ModifyRequest>
</tML-TA:ModifyAttributesRequest>
=== Sample XPaths ===
Errigal Key: ticket_id, Customer XPath: TargetObjectName/DistinguishedName/RDNSequenceItem[Type='troubleReportID']/Assertion
Errigal Key: att_network_id, Customer XPath: TargetObjectName/DistinguishedName/RDNSequenceItem[Type='networkID']/Assertion
Errigal Key: trouble_info, Customer XPath: ModifyRequest/AdditionalTroubleInfoList