SAPUI5 Responsive table multi select set selected records - html

I have a SAPUI5 responsive table with multi-select mode. And I need to show the selected records when loading data to the table. Couldn't find a way to set selected records in the responsive table.
<Table id="idProductsTable"
inset="false"
mode="MultiSelect"
alternateRowColors="true"
items="{
path: '/ProductCollection',
sorter: {
path: 'Name'
}
}">
<headerToolbar>
<OverflowToolbar>
<Title text="Products" level="H2"/>
<ToolbarSpacer/>
<Label text="Multi selection modes" labelFor="idComboBoxSuccess"></Label>
<ComboBox id="idComboBoxSuccess" selectedKey="Default" selectionChange=".onSelectionChange">
<core:Item text="Default" key="Default"></core:Item>
<core:Item text="ClearAll" key="ClearAll"></core:Item>
</ComboBox>
</OverflowToolbar>
</headerToolbar>
<columns>
<Column width="12em">
<Text text="Product" />
</Column>
<Column minScreenWidth="Tablet" demandPopin="true">
<Text text="Supplier" />
</Column>
<Column minScreenWidth="Tablet" demandPopin="true" hAlign="End">
<Text text="Dimensions" />
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<ObjectIdentifier
title="{Name}"
text="{ProductId}"/>
<Text
text="{SupplierName}" />
<Text
text="{Width} x {Depth} x {Height} {DimUnit}" />
</cells>
</ColumnListItem>
</items>
</Table>
Is there a way to set the selected rows in the table and display selected records.

You can use selected property in ColumnListItem.
<ColumnListItem selected="{YourSelectedBoolean}">
<cells>
<ObjectIdentifier title="{Name}" text="{ProductId}"/>
<Text text="{SupplierName}" />
<Text text="{Width} x {Depth} x {Height} {DimUnit}" />
</cells>
</ColumnListItem>
Fiddle

Related

Telerik Freezing header columns

From few days I have been trying to use freezing columns headers. I have followed knowledgebase of telerik reporting services. But still unable to get solutions.
<Table DataSourceName="sqlDataSource1" Width="3.531in" Height="0.48in" Left="0.4in" Top="0.4in" FreezeRowHeaders="False" FreezeColumnHeaders="True" Name="table1">
<Body>
<Cells>
<TableCell RowIndex="0" ColumnIndex="0" RowSpan="1" ColumnSpan="1">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="1.8in" Top="0.2in" Value="= Fields.FirstName" Name="textBox7" StyleName="" />
</ReportItem>
</TableCell>
<TableCell RowIndex="0" ColumnIndex="1" RowSpan="1" ColumnSpan="1">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="1.8in" Top="0.2in" Value="= Fields.InsertDate" Name="textBox2" StyleName="" />
</ReportItem>
</TableCell>
<TableCell RowIndex="0" ColumnIndex="2" RowSpan="1" ColumnSpan="1">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="1.8in" Top="0.2in" Value="= Fields.LastName" Name="textBox4" StyleName="" />
</ReportItem>
</TableCell>
</Cells>
<Columns>
<Column Width="1.177in" />
<Column Width="1.177in" />
<Column Width="1.177in" />
</Columns>
<Rows>
<Row Height="0.24in" />
</Rows>
</Body>
<Corner />
<RowGroups>
<TableGroup Name="detailTableGroup">
<Groupings>
<Grouping />
</Groupings>
</TableGroup>
</RowGroups>
<ColumnGroups>
<TableGroup Name="tableGroup">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="0in" Top="0in" Value="First Name" Name="textBox1" />
</ReportItem>
</TableGroup>
<TableGroup Name="tableGroup1">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="0in" Top="0in" Value="Insert Date" Name="textBox3" />
</ReportItem>
</TableGroup>
<TableGroup Name="tableGroup2">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="0in" Top="0in" Value="Last Name" Name="textBox5" />
</ReportItem>
</TableGroup>
</ColumnGroups>
</Table>
I am using above xml code for telerik reporting.
Thanks in advance
The configuration seems fine at first glance. Have you checked that the feature is supported (and makes sense) only for displaying in viewers in interactive mode?

Making the objectheader sticky and rest of the page scrollable

I have a page with an ObjectHeader and 4 panels. All the panels have a table with a horizontal scrollbar. I want to freeze the object header at the top whenever the page is scrolled. I tried the sticky property but it is not applicable for ObjectHeader but it is applicable to IconTab Bar. But in my case, I can't use IconTab Bar. I also tried some CSS but failed Please help. Below is my XML code.
XML Code :
<mvc:View xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" xmlns:t="sap.ui.table" xmlns="sap.m"
controllerName="sap.hmel.pymt.adv.controller.PaymentAdviceApp" displayBlock="true">
<App>
<pages>
<Page showHeader="false" showNavButton="true" navButtonPress="onCallPayAdvice">
<ObjectHeader title="" fullScreenOptimized="true" >
<attributes>
<ObjectAttribute title="Total Credit Values" text="+ ₹ {credModel>/header/TotalCreditItem}"/>
<ObjectAttribute title="Total Debit Values" text="- ₹ {credModel>/header/TotalDebitItem}"/>
<ObjectAttribute title="Balance" text=" ₹ {credModel>/header/TotalBalance}"/>
</attributes>
<statuses>
<ObjectStatus title="Selected Credit Values" text="+ ₹ {detail>/crdTotal}" state="{detail>/utrState}"/>
<ObjectStatus title="Selected Debit Values" text="- ₹ {detail>/invTotal}" state="{detail>/totalState}"/>
<ObjectStatus title="Balance" text=" ₹ {detail>/balance} {detail>/Waers}" state="{detail>/balState}"/>
</statuses>
</ObjectHeader>
<Panel expandable="true" headerText="Payment Document ( Subtotal : + ₹ {credModel>/header/PaymentSum})" class="sapUiMediumMarginBegin"
id="paymentPanel">
<ScrollContainer vertical="true">
<Table class="sapUiLargeMarginBottom" items="{credModel>/Payment}" growingThreshold="5" fixedLayout="false" id="paymentDocument"
growing="true" growingScrollToLoad="true" inset="false" mode="MultiSelect" selectionChange="onRowSelectionChangePayment">
<columns>
</columns>
<items>
<ColumnListItem id="columnTempId">
<cells>
</cells>
</ColumnListItem>
</items>
</Table>
</ScrollContainer>
</Panel>
<Panel expandable="true" headerText="Credit Note (Subtotal : + ₹ {credModel>/header/CreditSum})" class="sapUiMediumMarginBegin">
<ScrollContainer vertical="true">
<Table sticky="HeaderToolbar,ColumnHeaders" class="sapUiLargeMarginBottom" items="{credModel>/Credit}" id="creditNote" growing="true"
growingScrollToLoad="true" growingThreshold="5" mode="MultiSelect" selectionChange="onRowSelectionChangeCredit">
<columns>
</columns>
<items>
<ColumnListItem id="column">
<cells>
</cells>
</ColumnListItem>
</items>
</Table>
</ScrollContainer>
</Panel>
<Panel expandable="true" headerText="Invoice (Subtotal : - ₹ {credModel>/header/InvoiceSum})" class="sapUiMediumMarginBegin">
<ScrollContainer vertical="true">
<Table class="sapUiLargeMarginBottom" items="{credModel>/Invoice}" fixedLayout="false" id="invoice" growingThreshold="5" growing="true"
growingScrollToLoad="true" inset="false" mode="MultiSelect" selectionChange="onRowSelectionChange">
<columns>
</columns>
<items>
<ColumnListItem id="columnTemp">
<cells>
</cells>
</ColumnListItem>
</items>
</Table>
</ScrollContainer>
</Panel>
<Panel expandable="true" headerText="Debit Note (Subtotal : - ₹ {credModel>/header/DebitSum})" class="sapUiMediumMarginBegin">
<ScrollContainer vertical="true">
<Table class="sapUiLargeMarginBottom" items="{credModel>/Debit}" growingThreshold="5" fixedLayout="false" id="debitNote" growing="true"
growingScrollToLoad="true" inset="false" mode="MultiSelect" selectionChange="onRowSelectionChangeDebit">
<columns>
</columns>
<items>
<ColumnListItem id="columnId">
<cells>
</cells>
</ColumnListItem>
</items>
</Table>
</ScrollContainer>
</Panel>
<footer>
<Bar>
<contentRight>
<Button text="Create" type="Accept" id="btnCreateId" press="onCreate"/>
<Button text="Cancel" type="Reject" icon="sap-icon://decline" press="onCancel"/></contentRight>
</Bar>
</footer>
</Page>
</pages>
</App>

Blue Prism - is find Wait for Document Loaded available for Chrome?

I'm using BP 6.5, with new Browser Automation mode, and I see that it's missing some functionalities which was available for HTML mode. The most important for me is missing "Wait for Parent Document Loaded" - there's only Check Exists available.
Is it me doing sth wrong, or this is the only wait available for Browser mode? Is there a work around?
(Check Exists can work for most scenarios, but seems useless:
if page is refreshing automatically, after choosing some option from Combo,
Navigating to "Next page", reading HTML table, where most objects remains the same, and it's not possible to say which values are likely to be changed, etc)
The following still has to be extensively tested, but i try to help you.
SHORT ANSWER - MANUAL WAY & EXPLANATION:
Insert the following JavaScript to a mapped HTML tag, which always exists in a current page (html tag = HTML). This will create an element in the header. (Navigate stage > Insert JavaScript Fragment)
function CreateLoadedElement(){var LOADED = document.createElement("ChromePageLoadedForBluePrism");document.head.appendChild(LOADED);}
Now insert another one which will trigger this function when the document is loaded:
"window.onload = CreateLoadedElement();"
Now you need to have another element in the Application Modeller, which you are creating a waiting stage, which is waiting for this element to exists.
Due to that this element will be created only, when the document is loaded, therefore that element will held the Waiting stage correctly.
OR
LONG ANSWER - COPY ELEMENT WAY:
Follow the following steps:
STEP1:
Create the following element (HTML - Loaded) in Application Modeller:
Web Element Type = CHROMEPAGELOADEDFORBLUEPRISM
Match Index = 1
This element will be created by the JavaScript code in Stage Insert JS Page Loaded (Step 3), when the document loads.
STEP 2:
Create the following element (HTML - Html Root) in Application Modeller:
This an element what the page will interact also.
STEP 3:
Copy the following code and insert it as Page to your Object.
<process name="__selection__Software - Chrome Template" type="object">
<subsheet subsheetid="55725c0e-f413-4bd7-8949-b2e1524868cd" type="Normal" published="True">
<name>Wait Until Loads</name>
<view>
<camerax>0</camerax>
<cameray>48</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<stage stageid="063b8761-58b3-47fd-aee8-f6ecb45e5d23" name="Wait Until Loads" type="SubSheetInfo">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<narrative>Waits until the page is loaded. In case of time out throws exception.</narrative>
<display x="-195" y="-90" w="150" h="60" />
</stage>
<stage stageid="fdfe5291-d54c-482a-87fa-b387430d3deb" name="End" type="End">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-45" y="195" />
</stage>
<stage stageid="ff35742e-c8f1-4876-9bfd-ab378be3e216" name="Input" type="Block">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-270" y="-45" w="150" h="75" />
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="d8fba2e4-33d9-468f-80f1-59557058231e" name="Start" type="Start">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<preconditions>
<condition narrative="IE winodw is open and attached" />
<condition narrative="The page is not a blank page (about:blank)" />
</preconditions>
<postconditions>
<condition narrative="Page is loaded" />
</postconditions>
<display x="-45" y="-105" />
<inputs>
<input type="text" name="Parent URL" narrative="Page is to be loaded. Wildcard is allowed. First found will be chosen." stage="Parent URL" />
</inputs>
<onsuccess>23533afe-6d7c-48ff-b53a-8eb647519e0f</onsuccess>
</stage>
<stage stageid="c1d43556-4b3a-46eb-b08d-0cb1967a9c63" name="Parent URL" type="Data">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<display x="-195" y="-15" w="150" h="30" />
<datatype>text</datatype>
<initialvalue xml:space="preserve">*</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="fedb22ad-bcf0-44b7-b117-bcd8f937c72d" name="Go" type="WaitEnd">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-30" y="-45" w="30" h="30" />
<onsuccess>525c998c-dd0d-40a4-bdf0-fc3b94816f3e</onsuccess>
<groupid>ddb7d93e-1817-4d88-99a1-7639b8e6fa77</groupid>
</stage>
<stage stageid="23533afe-6d7c-48ff-b53a-8eb647519e0f" name="2s" type="WaitStart">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<narrative>It is needed to let IE respond to the previous navigate action</narrative>
<display x="-60" y="-45" w="30" h="30" />
<groupid>ddb7d93e-1817-4d88-99a1-7639b8e6fa77</groupid>
<choices />
<timeout>[Wait XS] * 2</timeout>
</stage>
<stage stageid="b32e859c-de87-49be-af60-8614c310b9d1" name="Time Out" type="WaitEnd">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-15" y="15" w="30" h="30" />
<onsuccess>f14ac644-b807-4a4d-bf2f-250a6159cdeb</onsuccess>
<groupid>dd9c94a3-1a29-4b7d-9570-bb5b39a4a221</groupid>
</stage>
<stage stageid="525c998c-dd0d-40a4-bdf0-fc3b94816f3e" name="HTML Doc" type="WaitStart">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-75" y="15" w="30" h="30" />
<groupid>dd9c94a3-1a29-4b7d-9570-bb5b39a4a221</groupid>
<choices>
<choice reply="True">
<name>HTML - HTML (HTML) Check Exists</name>
<distance>30</distance>
<ontrue>0a02670f-0fc9-429b-8817-d08250e9cb32</ontrue>
<element id="8f3babb6-a5d1-49c1-b771-b2c93198ebe4">
<elementparameter>
<name>wPageAddress</name>
<expression>[Parent URL]</expression>
<datatype>text</datatype>
<comparisontype>Wildcard</comparisontype>
</elementparameter>
</element>
<condition>
<id>CheckExists</id>
</condition>
<comparetype>Equal</comparetype>
</choice>
</choices>
<timeout>[Wait XL]</timeout>
</stage>
<stage stageid="f14ac644-b807-4a4d-bf2f-250a6159cdeb" name="HTML Document is not loeaded in time" type="Exception">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<display x="45" y="15" />
<exception localized="yes" type="System Exception" detail=""HTML Document is not loeaded in time."" />
</stage>
<stage stageid="8050e231-8753-47dd-8044-c1cb98582209" name="Not Found" type="WaitEnd">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-15" y="135" w="30" h="30" />
<onsuccess>707dec3d-5f31-421a-944e-f1dbfef3b8fb</onsuccess>
<groupid>65179067-ff34-48f6-98d8-4807b7f97f58</groupid>
</stage>
<stage stageid="f642c18e-277e-4af6-8a75-4ebdf4090f0e" name="Loaded" type="WaitStart">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-75" y="135" w="30" h="30" />
<groupid>65179067-ff34-48f6-98d8-4807b7f97f58</groupid>
<choices>
<choice reply="True">
<name>HTML - Loaded Check Exists</name>
<distance>30</distance>
<ontrue>fdfe5291-d54c-482a-87fa-b387430d3deb</ontrue>
<element id="91543f0d-e580-4c28-836f-7d101d35d6c9" />
<condition>
<id>CheckExists</id>
</condition>
<comparetype>Equal</comparetype>
</choice>
</choices>
<timeout>[Wait XL]</timeout>
</stage>
<stage stageid="707dec3d-5f31-421a-944e-f1dbfef3b8fb" name="Loaded Element Not Found" type="Exception">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<display x="45" y="135" />
<exception localized="yes" type="System Exception" detail=""Loaded Element Not Found"" />
</stage>
<stage stageid="d96ec66e-4310-4416-a253-c416509adf6d" name="CreateLoadedElement" type="Data">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-195" y="15" w="150" h="30" />
<datatype>text</datatype>
<initialvalue xml:space="preserve">function CreateLoadedElement(){var LOADED = document.createElement("ChromePageLoadedForBluePrism");document.head.appendChild(LOADED);}</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="0a02670f-0fc9-429b-8817-d08250e9cb32" name="Insert JS Page Loaded" type="Navigate" interval="[Wait XS] / 4">
<subsheetid>55725c0e-f413-4bd7-8949-b2e1524868cd</subsheetid>
<loginhibit />
<display x="-45" y="75" />
<onsuccess>f642c18e-277e-4af6-8a75-4ebdf4090f0e</onsuccess>
<step>
<element id="8f3babb6-a5d1-49c1-b771-b2c93198ebe4">
<elementparameter>
<name>wPageAddress</name>
<expression>[Parent URL]</expression>
<datatype>text</datatype>
<comparisontype>Wildcard</comparisontype>
</elementparameter>
</element>
<action>
<id>WebInjectJavascript</id>
<arguments>
<argument>
<id>fragmenttext</id>
<value>[CreateLoadedElement]</value>
</argument>
</arguments>
</action>
</step>
<step>
<element id="8f3babb6-a5d1-49c1-b771-b2c93198ebe4">
<elementparameter>
<name>wPageAddress</name>
<expression>[Parent URL]</expression>
<datatype>text</datatype>
<comparisontype>Wildcard</comparisontype>
</elementparameter>
</element>
<action>
<id>WebInjectJavascript</id>
<arguments>
<argument>
<id>fragmenttext</id>
<value>"window.onload = CreateLoadedElement();"</value>
</argument>
</arguments>
</action>
</step>
</stage>
</process>
STEP 4:
Copy the following code (two Variables) to the Initialise page:
<process name="__selection__Software - Chrome Template" type="object" runmode="Exclusive"><stage stageid="e7282352-6604-49eb-bb62-d57e9c2a8f68" name="Wait XL" type="Data"><loginhibit /><display x="-195" y="15" w="150" h="30" /><datatype>number</datatype><initialvalue>60</initialvalue><alwaysinit /></stage><stage stageid="9648a1bf-1642-467d-b8d9-c6b351165cbd" name="Wait XS" type="Data"><loginhibit /><display x="-195" y="45" w="150" h="30" /><datatype>number</datatype><initialvalue>1</initialvalue><alwaysinit /></stage></process>
STEP 5:
In the following picture, stages marked with 'H' map to the created element: 'HTML - Html Root', while the item marked with 'L', map it to the other created element: 'HTML - Loaded'.
STEP 6:
Check your error count to make sure there are no errors.
STEP 7:
The page will be working (if Chrome is not messing up with it's security settings), when a page already exists in the browser, as this requires an existing document loaded, but it is normally the case.

HTML template in xml - what kind of architecture is this?

My project has many xml files which are using to build html page & page operations. Here is the sample of grid template.
<Contact singular="Contact" indeal="" nodeal="ContactsPlaybook" tooltip="Document Playbook" library="true" tabHidden="true">
<ListingScreen handle = "PlaybookContacts.ashx" suppressCount="true" showFilters="true">
<IncludeScript src="scripts/jjedsEmaUser.js"/>
<SmartIcon editMode="false" requiredAction="Create" name="new" image="new.png" tooltip="Create" separator="false" href="PlaybookContactDetail.ashx?DealRef=${DealRef}" edit="true" />
<SmartIcon editMode="false" requiredAction="Delete" name="BulkDelete" image="delete.png" tooltip="Delete" separator="true"/>
<SmartIcon editMode="false" requiredAction="Read" actionOn="Contact" name="email" image="mail.png" tooltip="Email Team" href="PlaybookEmailTeam.ashx?DealRef=${DealRef}&Subject=Playbook&Body=${LinkToPage}" edit="true" />
<SmartIcon editMode="false" requiredAction="Read" name="print" image="print.png" tooltip="Print" onclick="javascript:window.print()" />
<!--<SmartIcon editMode="false" requiredAction="Administrate" name="CreateEmaUser" image="add_EMA_user.png" tooltip="Create EMA user" onclick="return emans.jjedsEmaUser.create('${DealRef}', '#ListingForm')" />-->
<Filters>
<Filter label="Functional Team" filter="FunctionalCategoryFilter" field="ContactGroupID" prefix="C" empty="FunctionalCategoryRef_NULL">
<PossibleValues displayProperty="Name" />
</Filter>
<Filter label="Country" filter="CountryFilter" by="name" prefix="AD" field="CountryID" displayProperty="Code" empty="-1">
</Filter>
<Filter label="Business Unit" filter="PickListIntFilter" field="BusinessUnit" prefix="C" empty="-1" onlyifsettingtrue="UseSpecialUserDealAccess">
<PossibleValues category="Deal" subcategory="BusinessUnit" />
</Filter>
</Filters>
<Sorting>
<SortColumn name="FullName" dir="asc"/>
</Sorting>
<Query alias="C" ignoreArchiving="true" ignoreDeal="true">
<Block by="C.ContactGroupID" resolveto="DepartmentName" as="Department" />
<JoinTo table="Address" alias="AD" from="C.AddressID" to="AD.AddressID">
</JoinTo>
<Constraint left="C.IsArchived" int="0" />
</Query>
<Column command="true" title="<input type='checkbox' header='true' onclick='ToggleCheckAll(this);'>" editMode="false" special="IsDelete" macro="Checkbox" onClick="ToggleCheckBox(this);"/>
<Column command="true" requiredAction="Update" title="" field="Blank" dbColumn="C.ContactID" macro="ImageLink" fieldType="Contact" tooltip="Edit" image="edit.png" edit="true" />
<Column title="Full Name" field="FullName" macro="LinkToRef" resolveto="FullContactName" from="C.ContactID" contactAlias="C" linkPage="PlaybookContactDetail.ashx"/>
<Column title="Organization" field="C.Affiliation" macro="Text" />
<Column title="Business Unit" field="C.BusinessUnit" property="BusinessUnit" macro="PickList" category="Deal" subcategory="BusinessUnit" storeInt="true" onlyifsettingtrue="UseSpecialUserDealAccess"/>
<Column title="Role" field="C.Role" macro="Text" />
<Column title="Phone" field="C.Phone" macro="Text" />
<Column title="Email" field="C.Email" macro="MailToRef" />
<DeleteDialog name="ContactDelete" info="If you really want to delete {0} please choose the contact which will be used instead."
title="Confirm delete" type="ContactDeleteDialog" >
</DeleteDialog>
</ListingScreen>
</Contact>
Can anyone tell me what kind of architecture is this and what is the real benefit of using this architecture?
It is used in Single page applications to populate the page using an ajax call from the browser to XML files/JSON files in the server thus avoiding reloading of the entire page.
Look into this example
https://www.w3schools.com/js/tryit.asp?filename=tryjs_ajax_xml2
Here on clicking the button the table gets loaded with the xml data from cd_catalog.xml
https://www.w3schools.com/js/cd_catalog.xml
Its architechture is similar to HTML in the way that both are markup languages.
The data is accessed using the nested structure of the tags.In the cd.catalog example the title column is accessed as catalog->cd->title.

Summarise an a XML data

I have an input in the format below which pulls all movie lists with actor names (key is movie) and I need to summarize the data on actor perspective.
<Response>
<dpDeviceName>TEST</dpDeviceName>
<dpTxnId>10412325</dpTxnId>
<dpTimespamp>2014-06-19 08:51:41 UTC</dpTimespamp>
<StoredProcedureResult>
<resultSet>
<metadata>
<columnInfo index="1" nullable="false" name="FNAME" precision="3" scale="0" type="SQL_CHAR"/>
<columnInfo index="2" nullable="false" name="LNAME" precision="30" scale="0" type="SQL_CHAR"/>
<columnInfo index="3" nullable="false" name="ID" precision="3" scale="0" type="SQL_CHAR"/>
<columnInfo index="4" nullable="false" name="MOVIE" precision="3" scale="0" type="SQL_CHAR"/>
</metadata>
<row>
<column>
<name>FNAME</name>
<value>TOM</value>
</column>
<column>
<name>LNAME</name>
<value>CRUISE</value>
</column>
<column>
<name>MOVIE</name>
<value>Jack Reacher</value>
</column>
<column>
<name>ID</name>
<value>123</value>
</column>
</row>
<row>
<column>
<name>FNAME</name>
<value>TOM</value>
</column>
<column>
<name>LNAME</name>
<value>CRUISE</value>
</column>
<column>
<name>MOVIE</name>
<value>TOPGUN</value>
</column>
<column>
<name>ID</name>
<value>123</value>
</column>
</row>
<row>
<column>
<name>FNAME</name>
<value>MORGAN</value>
</column>
<column>
<name>LNAME</name>
<value>FREEMAN</value>
</column>
<column>
<name>MOVIE</name>
<value>SEVEN</value>
</column>
<column>
<name>ID</name>
<value>128</value>
</column>
</row>
</resultSet>
</StoredProcedureResult>
</Response>
I need this to be formatted in the below manner :
<library>
<Actor>
<firstname>TOM</firstname>
<lastname>CRUISE</lastname>
<movielist>
<movie>Jack Reacher</movie>
<movie>TOPGUN</movie>
</movielist>
<id>123</id>
</Actor>
<Actor>
<firstname>MORGAN</firstname>
<lastname>FREEMAN</lastname>
<movielist>
<movie>Seven</movie>
</movielist>
<id>128</id>
</Actor>
</library>
I am stuck at the place where i have to make a reference to next row from current for each loop to decide if movie list has to continue or block has to be closed. Any guidance here is greatly appreciated.