[AccessD] xml tables
Stuart McLachlan
stuart at lexacorp.com.pg
Mon Jun 27 23:40:14 CDT 2022
In that case, brute force is about the only way to do it.
<table>,<tr>,<th> and <td> tags are not case specific
( a mix of <td>, <TD>, <Td> is quite possible :) )
and you can have </td> or </ td> (or even </ td>
Also they can contain all sorts of additional info (styles, alignment, IDs etc).
The actual data between <td> tags can also contain all sorts of formatting tags (which may
or may not be paired (e.g. <br />)
In addition, there may or may not be a row containing column names in <th> tags
To say nothing of nested table where you have a complete table inside a single <td> pair :(
--
Stuart
On 27 Jun 2022 at 22:18, John Colby wrote:
> It is html. Sorry for the confusion.
>
> On Mon, Jun 27, 2022 at 6:26 PM Stuart McLachlan
> <stuart at lexacorp.com.pg> wrote:
>
> > Is it XML or HMTL. SInce it's a webpage, I would expect it to be an
> > HTML table, not XML. The two are very different and need to be
> > handled in different ways.
> >
> > An XML table looks like this:
> >
> > <CATALOG>
> > <CD>
> > <TITLE>Empire Burlesque</TITLE>
> > <ARTIST>Bob Dylan</ARTIST>
> > <COUNTRY>USA</COUNTRY>
> > <COMPANY>Columbia</COMPANY>
> > <PRICE>10.90</PRICE>
> > <YEAR>1985</YEAR>
> > </CD>
> >
> > An HTML table look like this:
> > <table>
> > <tr>
> > <th>Company</th>
> > <th>Contact</th>
> > <th>Country</th>
> > </tr>
> > <tr>
> > <td>Alfreds Futterkiste</td>
> > <td>Maria Anders</td>
> > <td>Germany</td>
> > </tr>
> > <tr>
> > <td>Centro comercial Moctezuma</td>
> > <td>Francisco Chang</td>
> > <td>Mexico</td>
> > </tr>
> > </table>
> >
> >
> >
> >
> >
> > On 27 Jun 2022 at 9:16, John Colby wrote:
> >
> > > Does anyone have a good resource on how to work with xml tables?
> > > I have an application where I read the html from a web page. This
> > > HTML has a table of info about a user and I need to parse out
> > > specific pieces and pull it into my database. The data is in a
> > > table, with all of the associated table and field tags.
> > >
> > > I do a brute force parse to extract what I want but I just know
> > > that there is a way to pull the table out and iterate the rows. I
> > > like clean and brute force parse is NOT clean.
> > >
> > > I am currently referencing the Microsoft XML v6.0 for working with
> > > xml. I don't use it much and have minimal knowledge of it. Any
> > > tips or example code would be appreciated.
> > >
> > > --
> > > John W. Colby
> > > Colby Consulting
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> John W. Colby
> Colby Consulting
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
More information about the AccessD
mailing list