cloudformatter format requests: 1,137,584    pages delivered: 2,940,417

Custom XML in Web Page

xportability LLC

Custom XML in Web Page


With today's browser technology, you can use css to style any content you wish. This includes any generic XML inserted into the HTML file. For example, consider that you just wish to place the sales data through some dynamic process into a table. If you examine the source HTML for this page here, you will see only XML. It is 100% styled with external css in the file named "xmlsamp.css".

The table below in HTML looks like this:

<StmtSum width="100%">
        <ProdDes> Account Description </ProdDes>
        <AcctNum>Account Number</AcctNum>
        <PlId>Policy ID</PlId>
        <ProdGrp>Product Group</ProdGrp>
            <ProdDes> Investment Savings Account </ProdDes>
Account Description Account NumberBalanceNNamePolicy IDProduct GroupFlag Investment Savings Account 3003747305$15,998.45SAV0 Guaranteed Investment (GIC) 3500462605$43,097.63CD0 Guaranteed Investment (GIC) 3500628788$15,413.42CD0 Guaranteed Investment (GIC) 3501134125$10,728.14CD0 Guaranteed Investment (GIC) 3501244435$10,744.40CD0 Guaranteed Investment (GIC) 3502110030$12,385.05CD0 Guaranteed Investment (GIC) 3502130256$15,481.32CD0 Guaranteed Investment (GIC) 3502284665$10,362.26CD0 Guaranteed Investment (GIC) 3502284702$15,543.39CD0 Guaranteed Investment (GIC) 3502798416$20,000.00CD0 Guaranteed Investment (GIC) 3502798430$20,000.00CD0 Guaranteed Investment (GIC) 3502801909$25,000.00CD0 Guaranteed Investment (GIC) 3503119658$16,000.00CD0 Guaranteed Investment (GIC) 3503183512$29,273.21CD0

And this table is formatted according to the css styling, even carried through to the PDF. You do not have to change XML tags, you only indicate their style as "table" or "table-row" or "block" or "inline" in the css and XEPOnline will format the generic XML according to the css styling to print.