Click to See Complete Forum and Search --> : Is this correct...er, well-formed


Phil Pastor
03-21-2000, 08:57 AM
I have an xml document that describes tables and their relationships. When I
try to load it into the MS XML Parser it returns FALSE. Following is the
basic structure. Is it correct?

<collection>
<sourcetable name="CUSTOMER" output="ext_acct.txt" alias="c">
<field name="CUST_NO">
<maps datatype="C" length="10" selection="c.Cust_no">
</field>
<field name="DESCR">
<maps datatype="C" length="20" selection="s.Descr">
</field>
<sourcetable name="STATES" output="" alias="s">
<join parenttable="CUSTOMER" parentcol="STATE" thiscol="STATE"/>
</sourcetable>
</sourcetable>
</collection>


--
Geoffrey M. Inget
vgminget@wizvax.net

(To reply via-email, dispose of the leading letter v)

Craig Clearman
03-21-2000, 10:25 AM
Phil,

>I have an xml document that describes tables and their relationships. When I
>try to load it into the MS XML Parser it returns FALSE. Following is the
>basic structure. Is it correct?

Nope. Neither of your maps elements is terminated:

> <maps datatype="C" length="10" selection="c.Cust_no">

Should be:

<maps datatype="C" length="10" selection="c.Cust_no"/>

Ciao, Craig

Phil Pastor
03-21-2000, 10:33 AM
Craig,

I knew a fresh set of eyes would find the problem. I was worried that the
nested sourcetable tags would be a problem. They aren't, are they?

Thanks again,

Phil

Craig Clearman wrote in message
<4g1fdsk17hec9r9fik1gi63al59nrefoce@4ax.com>...
>Phil,
>
>>I have an xml document that describes tables and their relationships. When
I
>>try to load it into the MS XML Parser it returns FALSE. Following is the
>>basic structure. Is it correct?
>
>Nope. Neither of your maps elements is terminated:
>
>> <maps datatype="C" length="10" selection="c.Cust_no">
>
>Should be:
>
> <maps datatype="C" length="10" selection="c.Cust_no"/>
>
>Ciao, Craig
>

Craig Clearman
03-21-2000, 11:57 AM
Phil,

>I knew a fresh set of eyes would find the problem. I was worried that the
>nested sourcetable tags would be a problem. They aren't, are they?

Nope. The nesting is fine. I don't think I've seen anybody do that
before, but there really is no problem.

Ciao, Craig

Greg Longtin
03-21-2000, 01:03 PM
Phil,

The MS XML Parser has a parseError object that will return error info about
parse errors. Error type, source text, line number, etc.

It's very helpful when one's been at it to long...

Greg Longtin