T
TexasAggie96
I am working on a project where I get a XML datastream back from an
application API which may contain a particular value that may be
emty. An example of this can be seen below
<?xml version="1.0" encoding="iso-8859-1" ?>
- <NamedProfileList>
- <NamedProfile>
<ProfileID>115280</ProfileID>
<Name>Generation|Aks G7|16316</Name>
<Type>Meter</Type>
<StartTime>2007-06-21T00:00:00</StartTime>
<StopTime>2007-06-21T01:00:00</StopTime>
<Value>0.000</Value>
</NamedProfile>
- <NamedProfile>
<ProfileID>115280</ProfileID>
<Name>Generation|Aks G7|16316</Name>
<Type>Meter</Type>
<StartTime>2007-06-21T01:00:00</StartTime>
<StopTime>2007-06-21T02:00:00</StopTime>
<Value />
</NamedProfile>
....
....
When loading the XML this value causes the dataset to throw an
exception because there is a NULL value there. My question is is
there a way to keep this NULL value from throwing an exception on the
load of the dataset? I have searched the web over for an answer and
have not found one. Thanks for any help offered.
James
application API which may contain a particular value that may be
emty. An example of this can be seen below
<?xml version="1.0" encoding="iso-8859-1" ?>
- <NamedProfileList>
- <NamedProfile>
<ProfileID>115280</ProfileID>
<Name>Generation|Aks G7|16316</Name>
<Type>Meter</Type>
<StartTime>2007-06-21T00:00:00</StartTime>
<StopTime>2007-06-21T01:00:00</StopTime>
<Value>0.000</Value>
</NamedProfile>
- <NamedProfile>
<ProfileID>115280</ProfileID>
<Name>Generation|Aks G7|16316</Name>
<Type>Meter</Type>
<StartTime>2007-06-21T01:00:00</StartTime>
<StopTime>2007-06-21T02:00:00</StopTime>
<Value />
</NamedProfile>
....
....
When loading the XML this value causes the dataset to throw an
exception because there is a NULL value there. My question is is
there a way to keep this NULL value from throwing an exception on the
load of the dataset? I have searched the web over for an answer and
have not found one. Thanks for any help offered.
James