HaHaItsJake 25 Posted October 7, 2014 Report Share Posted October 7, 2014 Hello Ubotters, I have the following completed: If XML contains a Table Cell Value(ID) Now I'm trying to If the ID is in the XML, then add a child under the last Child node of the IDIf the ID is NOT in the XML, I want it to create a new element under the last element. I search the XML ID list with xpath praser for ID: R103828466 ID is in XML It then will go to that element, go under the last Data(Child) Element, and insert a new "Data" child element. ID is NOT in XMLIt then will go to the very last "Member" element and insert a new "Member" Element with the Attributes then add a Data(Child) Element under the new Member element. Then I'm also trying to change a certain Attribute. Change R103828466 MemberUntil value.I think I'm missing something that is common, but XML with UBot is new to me. XML: <?xml version="1.0"?> <AccountManager> <Member id="R103828466" MemberSince="2014/09/09" MemberUntil="12/31/3030"> <Data id="1" Last="2014/10/05" Amount="34"> </Data> </Member> <Member id="R104950769" MemberSince="2014/08/25" MemberUntil="12/31/3030"> <Data id="1" Last="2014/10/06" Amount="46"> -------------------------------------------------------If the ID is in the XML, then add a child under the last Child node of the ID </Data> </Member> <Member id="R105836511" MemberSince="2014/09/24" MemberUntil="12/31/3030"> <Data id="1" Last="2014/10/05" Amount="20"> </Data> </Member> ----------------------------------------------------------If the ID is NOT in the XML, I want it to create a new element under the last element. <Member> NOT <MembershipDetails> With the child "Data". <MembershipDetails> <Membership id="Rare"> </Membership> </MembershipDetails> </AccountManager>Regards, HaHaItsJake Quote Link to post Share on other sites
HaHaItsJake 25 Posted October 8, 2014 Author Report Share Posted October 8, 2014 Any insight would be helpful. I have tried everything I could think of and came up with a complicated work around for now using the basic Ubot commands. Regards, HaHaItsJake Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.