I am trying to construct a prototype that uses an XML file to fill a table.

In the example below I am using inline XML instead of an external file.

If I exclude the

<item>
<itemdata>12345</itemdata>
</item>

piece, all works fine.

Can someone suggest how I can structure the table so that the
<item> pieces can be bypassed?

If not, (other than editing the XML) is there another way of logically
excluding those data elemtents so that the binding works nicely?

Many thanks for any help

I tried the group microsoft.public.inetsdk.programming.html_objmodel without
success
but if you can also suggest alternative places to ask, I'd welcome them.

This is obviously a simple explanation of what will be a scripted solution.




=======example
<html>

<head>

<Title>XML Test by RixTrix</title>

</HEAD><TITLE></TITLE>
<BODY>
<XML ID="xmlStatements">
<?xml version = "1.0" encoding = "UTF-8"?>

<index>
<item>
<itemdata>12345</itemdata>
</item>

<Content>
<ContentFile>/STATEMENTS/0000.PDF</ContentFile>
<ContentName>Combined 50695</ContentName>
<ContentType>application/pdf</ContentType>
</Content>
<Content>
<ContentFile>/STATEMENTS/0001.PDF</ContentFile>
<ContentName>Checking 241267</ContentName>
<ContentType>application/pdf</ContentType>
</Content>
<Content>
<ContentFile>/STATEMENTS/0002.PDF</ContentFile>
<ContentName>Combined 405882</ContentName>
<ContentType>application/pdf</ContentType>
</Content>


</index>
</XML>

<table datasrc="#xmlstatements" border=3>
<tr><td>First Cell</td>
<td><div datafld="ContentName"></div></td>
<td><div datafld="ContentFile"></div></td>
<td><div datafld="ContentType"></div></td>
<td>Last Cell</td>
</tr>
</table>
</BODY>
</HTML>


--
Rickety

Re: Using XML data in an HTML table - help please by Han

Han
Wed Jul 16 22:30:37 CDT 2003

Remove the datasrc part, and set it dynamically as follows.

sub window_onload
xmlStatements.documentelement.removechild _
xmlStatements.documentelement.firstchild
t1.datasrc="#xmlstatements"
end sub

Another NG is microsoft.public.xml. But data island question is sometimes
not answered because it's not main stream.

"rickety" <ricklugg@knickers.iname.com> wrote in message
news:3f157717$1@rpc1284.daytonoh.ncr.com...
> I am trying to construct a prototype that uses an XML file to fill a
table.
>
> In the example below I am using inline XML instead of an external file.
>
> If I exclude the
>
> <item>
> <itemdata>12345</itemdata>
> </item>
>
> piece, all works fine.
>
> Can someone suggest how I can structure the table so that the
> <item> pieces can be bypassed?
>
> If not, (other than editing the XML) is there another way of logically
> excluding those data elemtents so that the binding works nicely?
>
> Many thanks for any help
>
> I tried the group microsoft.public.inetsdk.programming.html_objmodel
without
> success
> but if you can also suggest alternative places to ask, I'd welcome them.
>
> This is obviously a simple explanation of what will be a scripted
solution.
>
>
>
>
> =======example
> <html>
>
> <head>
>
> <Title>XML Test by RixTrix</title>
>
> </HEAD><TITLE></TITLE>
> <BODY>
> <XML ID="xmlStatements">
> <?xml version = "1.0" encoding = "UTF-8"?>
>
> <index>
> <item>
> <itemdata>12345</itemdata>
> </item>
>
> <Content>
> <ContentFile>/STATEMENTS/0000.PDF</ContentFile>
> <ContentName>Combined 50695</ContentName>
> <ContentType>application/pdf</ContentType>
> </Content>
> <Content>
> <ContentFile>/STATEMENTS/0001.PDF</ContentFile>
> <ContentName>Checking 241267</ContentName>
> <ContentType>application/pdf</ContentType>
> </Content>
> <Content>
> <ContentFile>/STATEMENTS/0002.PDF</ContentFile>
> <ContentName>Combined 405882</ContentName>
> <ContentType>application/pdf</ContentType>
> </Content>
>
>
> </index>
> </XML>
>
> <table datasrc="#xmlstatements" border=3>
> <tr><td>First Cell</td>
> <td><div datafld="ContentName"></div></td>
> <td><div datafld="ContentFile"></div></td>
> <td><div datafld="ContentType"></div></td>
> <td>Last Cell</td>
> </tr>
> </table>
> </BODY>
> </HTML>
>
>
> --
> Rickety
>
>



Re: Using XML data in an HTML table - help please by rickety

rickety
Thu Jul 17 07:55:50 CDT 2003

Han wrote:
> Remove the datasrc part, and set it dynamically as follows.
>
> sub window_onload
> xmlStatements.documentelement.removechild _
> xmlStatements.documentelement.firstchild
> t1.datasrc="#xmlstatements"
> end sub
>
> Another NG is microsoft.public.xml. But data island question is
> sometimes not answered because it's not main stream.
>
> "rickety" <ricklugg@knickers.iname.com> wrote in message
> news:3f157717$1@rpc1284.daytonoh.ncr.com...
>> I am trying to construct a prototype that uses an XML file to fill a
>> table.
>>
>> In the example below I am using inline XML instead of an external
>> file.
>>
>> If I exclude the
>>
>> <item>
>> <itemdata>12345</itemdata>
>> </item>
>>
>> piece, all works fine.
>>
>> Can someone suggest how I can structure the table so that the
>> <item> pieces can be bypassed?
>>
>> If not, (other than editing the XML) is there another way of
>> logically excluding those data elemtents so that the binding works
>> nicely?
>>
>> Many thanks for any help
>>
>> I tried the group microsoft.public.inetsdk.programming.html_objmodel
>> without success
>> but if you can also suggest alternative places to ask, I'd welcome
>> them.
>>
>> This is obviously a simple explanation of what will be a scripted
>> solution.
>>
>>
>>
>>
>> =======example
>> <html>
>>
>> <head>
>>
>> <Title>XML Test by RixTrix</title>
>>
>> </HEAD><TITLE></TITLE>
>> <BODY>
>> <XML ID="xmlStatements">
>> <?xml version = "1.0" encoding = "UTF-8"?>
>>
>> <index>
>> <item>
>> <itemdata>12345</itemdata>
>> </item>
>>
>> <Content>
>> <ContentFile>/STATEMENTS/0000.PDF</ContentFile>
>> <ContentName>Combined 50695</ContentName>
>> <ContentType>application/pdf</ContentType>
>> </Content>
>> <Content>
>> <ContentFile>/STATEMENTS/0001.PDF</ContentFile>
>> <ContentName>Checking 241267</ContentName>
>> <ContentType>application/pdf</ContentType>
>> </Content>
>> <Content>
>> <ContentFile>/STATEMENTS/0002.PDF</ContentFile>
>> <ContentName>Combined 405882</ContentName>
>> <ContentType>application/pdf</ContentType>
>> </Content>
>>
>>
>> </index>
>> </XML>
>>
>> <table datasrc="#xmlstatements" border=3>
>> <tr><td>First Cell</td>
>> <td><div datafld="ContentName"></div></td>
>> <td><div datafld="ContentFile"></div></td>
>> <td><div datafld="ContentType"></div></td>
>> <td>Last Cell</td>
>> </tr>
>> </table>
>> </BODY>
>> </HTML>
>>
>>
>> --
>> Rickety

Thanks Han for the suggestion and pointer

--
Rickety



Re: Using XML data in an HTML table - help please by rickety

rickety
Thu Jul 17 16:14:36 CDT 2003

To follow up my follow up. Based on your suggestion, I was able to script
the ability to bypass any number of childnodes.

It helps me with the prototype. I think I need to look into xsl as a method
of being able to dynamically get the nodes that I need in different tables.

You helped with that vital clue about manipulating the XML document!

--
Rickety