Hi Experts,
I have an issue with XML tags
in correct version of XML , the tags are correct in order like below
<Header>
<Data>
<TramissID>
<CountryID>IT</CountryID>
<Pincode>08973230967</Pincode>
</TranmissID>
<ID>01269</ID>
<Code>FPR12</Code>
</Data>
</Header>
But in Some Case based on condition
the Tag are getting reversed
<Header>
<Data>
<ID>01269</ID>
<Code>FPR12</Code>
<TramissID>
<CountryID>IT</CountryID>
<Pincode>08973230967</Pincode>
</TranmissID>
</Data>
</Header>
The above reversed Tags is wrong.
it has to be in the order like correct version.
Why this happens ?
Could any one suggest?
0
Answers
Paste both xmls to some online xpath checker (I personally prefer freeformatter.com), and then try to pull out, for example, the CountriID node, using the /Header/Data/TramissID/CountryID xpath. You will get the same result in both cases (once you fix the TranmissID tag in your samples)
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
The Solution for the above issue is found.
Now in System we have Creation of Tag"TramissID" is common for both the cases(With Condition and without condition).
The Solution is
We need to apply Creation of Tag "TramissID" for With Condition seperate,
Second seperately apply Creation of Tag "tramissID" for without condition.
Before correction it was like
<Header>
<Data>
Create <TramissID>
If condition the begin
<CountryID>IT</CountryID>
<Pincode>08973230967</Pincode>
</TranmissID>
<ID>01269</ID>
<Code>FPR12</Code>
end
else begin
<CountryID>IT</CountryID>
<Pincode>08973230967</Pincode>
</TranmissID>
<ID>01269</ID>
<Code>FPR12</Code>
End
</Data>
</Header>
After correction it was like below, which will solve the Problem
<Header>
<Data>
If condition the begin
Create <TramissID>
<CountryID>IT</CountryID>
<Pincode>08973230967</Pincode>
</TranmissID>
<ID>01269</ID>
<Code>FPR12</Code>
end
else begin
Create <TramissID>
<CountryID>IT</CountryID>
<Pincode>08973230967</Pincode>
</TranmissID>
<ID>01269</ID>
<Code>FPR12</Code>
End
</Data>
</Header>
Thank you Mr.Guzek for your kind input .