|
|
|
date: Mon, 21 Apr 2008 19:48:01 -0700,
group: microsoft.public.xml
back
Re: Need information abount XML file
Hello Peter.
I apologize for not seeing the end tags of </OpProfileSession>, </Actual>
and </Trip> inside of TripData. It looks a lot clearer now. Is this how my
xml file is structured?
<TripExportDataObject>
<Trip>
<TripID>
<CurrentRevisionNumber>
<IsDispatch>
<IsActive>
<IsComplete>
<IsArchived>
<XVIN>
<OrganizationID>
<UserDefinedRouteID>
<StartDate>
<EndDate>
<LastMessageDate>
<TripType>
<TimeVariance>
<DateLastModified>
<TripData>
<Trip>
<Actual>
<OpProfileSession>
<SpeedBracket>
</SpeedBracket>
</OpProfileSession>
</Actual>
</Trip>
</TripData>
</Trip>
</TripExportDataObject>
There are two <Trip> elements. One inside <TripExportDataObject> which has
a child of <TripData> which in turn has a <Trip> element as child.
I think what i don't understand, is why Internet Explorer does not display
the elements in TripData the same way that it displays the elements(TripID,
CurrentRevisionNumber,IsDispatch, etc.) in the<TripExportDataObject>/<Trip>
elements.
Thanks,
Tony
"Peter Flynn" wrote:
> Tony Girgenti wrote:
> > Martin Honnen wrote:
> >> I copied the markup you posted into a Visual Studio XML editor window
> >> which adds indendation even for poorly formatted XML.<
> >
> > I tried copying it into an xml edit file in VS. Is my xml file poorly
> > formatted?
>
> It's not formatted for human reading. Not that is needs to be, unless
> you want humans to read it. But it's just a convenient way to do it:
> it's common to indent the structure so that you can see what element
> types are nested inside others. Any decent XML editor will do this for
> you. Never use a non-XML editor to open an XML document.
>
> > I still can't see how you determined that Actual is a child of Trip. They
> > look the same to me except for the element name.
>
> I've copied a simplified version of your document here, indented to show
> the nesting (I've omitted the second instance of the second-level Trip
> element, and all the reoccurrences of SpeedBracket to keep it sort).
>
> You can immediately see from the indented nesting that Actual is
> *inside* <Trip>...</Trip> and that Actual itself also has a child
> element, OpProfileSession, which in turn has multiple SpeedBracket elements.
>
> <TripExportDataObject xmlns="http://tempuri.org/TripExportDataObject.xsd">
> <Trip>
> <TripID>39358</TripID>
> <CurrentRevisionNumber>1</CurrentRevisionNumber>
> <IsDispatch>false</IsDispatch>
> <IsActive>false</IsActive>
> <IsComplete>true</IsComplete>
> <IsArchived>true</IsArchived>
> <XVIN>67112663</XVIN>
> <OrganizationID>1217</OrganizationID>
> <UserDefinedRouteID>0</UserDefinedRouteID>
> <StartDate>2008-04-19T04:00:00-05:00</StartDate>
> <EndDate>2008-04-20T04:00:00-05:00</EndDate>
> <LastMessageDate>2008-04-20T04:14:49.967-05:00</LastMessageDate>
> <TripType>OperationProfile</TripType>
> <TimeVariance>0</TimeVariance>
> <DateLastModified>2008-04-20T04:14:49.96-05:00</DateLastModified>
> <TripData>
> <Trip InternalElementID="1" UniqueID="1" TripID="39358"
> TripType="OperationProfile" Audited="False"
> UnknownDriver="False" OrganizationID="1217">
> <Actual InternalElementID="2" UniqueID="2"
> UserDefinedRouteID="0" XVIN="67112663" BegOdo="0" EndOdo="0"
> BegFuel="0" EndFuel="0" BegDateTime="2008-04-19T04:00:00"
> EndDateTime="2008-04-20T04:00:00" BegLatitude="0"
> BegLongitude="0" EndLatitude="0" EndLongitude="0"
> StartingRoadwayStatus="Taxable">
> <OpProfileSession InternalElementID="3" UniqueID="3"
> StartTime="2008-04-19T04:00:00" EndTime="2008-04-20T04:00:00"
> StopDurationSeconds="86439" StopDistanceMiles="0"
> StopFuelQtyGallons="0" StopIdleDurationSeconds="0"
> StopIdleFuelQtyGallons="0" StopMoveDurationSeconds="0"
> DelayCount="0" DelayDurationSeconds="0" DelayDistanceFeet="0"
> DelayFuelQtyGallons="0" SpeedingDistanceMiles="0"
> SpeedingDurationSeconds="0" PanicCount="0"
> StateBordersCrossedCount="0" SessionDurationSeconds="86439"
> StopCount="0" StoppedAtStart="True" Mode="Unknown">
> <SpeedBracket InternalElementID="4" UniqueID="4"
> HighSpeedMPH="5" DurationSeconds="0" DistanceMiles="0"
> FuelQtyGallons="0" CoastDistanceMiles="0"
> CruiseDurationSeconds="0" CruiseDistanceMiles="0"
> CruiseFuelQtyGallons="0" BrakeCount="0"
> LowTorqueDurationSeconds="0" HighTorqueDurationSeconds="0"
> BracketNumber="0" />
> <!-- more SpeedBracket elements go in here -->
> </OpProfileSession>
> </Actual>
> </Trip>
> </TripData>
> </Trip>
> </TripExportDataObject>
>
> ///Peter
> --
> XML FAQ: http://xml.silmaril.ie/
>
date: Wed, 23 Apr 2008 07:06:02 -0700
author: Tony Girgenti tony(nospam)@lakesideos.com
Re: Need information abount XML file
Hello Peter and Martin.
I'm sorry for asking so many questions, but i feel like i need to know if
this stuff inside of <TripData> has a special meaning in XML or a special
name.
I want to process it using XML commands, but i don't know what it is called
so that i can reference it.
I tried opening it in Internet Explorer, READXML it into a dataset, using it
as an XML DataSource for a gridview. Each case yields <TripData> as one big
element.
What makes <TripData> different than the other elements in the xml file?
Thanks,
Tony
"Peter Flynn" wrote:
> Tony Girgenti wrote:
> > Martin Honnen wrote:
> >> I copied the markup you posted into a Visual Studio XML editor window
> >> which adds indendation even for poorly formatted XML.<
> >
> > I tried copying it into an xml edit file in VS. Is my xml file poorly
> > formatted?
>
> It's not formatted for human reading. Not that is needs to be, unless
> you want humans to read it. But it's just a convenient way to do it:
> it's common to indent the structure so that you can see what element
> types are nested inside others. Any decent XML editor will do this for
> you. Never use a non-XML editor to open an XML document.
>
> > I still can't see how you determined that Actual is a child of Trip. They
> > look the same to me except for the element name.
>
> I've copied a simplified version of your document here, indented to show
> the nesting (I've omitted the second instance of the second-level Trip
> element, and all the reoccurrences of SpeedBracket to keep it sort).
>
> You can immediately see from the indented nesting that Actual is
> *inside* <Trip>...</Trip> and that Actual itself also has a child
> element, OpProfileSession, which in turn has multiple SpeedBracket elements.
>
> <TripExportDataObject xmlns="http://tempuri.org/TripExportDataObject.xsd">
> <Trip>
> <TripID>39358</TripID>
> <CurrentRevisionNumber>1</CurrentRevisionNumber>
> <IsDispatch>false</IsDispatch>
> <IsActive>false</IsActive>
> <IsComplete>true</IsComplete>
> <IsArchived>true</IsArchived>
> <XVIN>67112663</XVIN>
> <OrganizationID>1217</OrganizationID>
> <UserDefinedRouteID>0</UserDefinedRouteID>
> <StartDate>2008-04-19T04:00:00-05:00</StartDate>
> <EndDate>2008-04-20T04:00:00-05:00</EndDate>
> <LastMessageDate>2008-04-20T04:14:49.967-05:00</LastMessageDate>
> <TripType>OperationProfile</TripType>
> <TimeVariance>0</TimeVariance>
> <DateLastModified>2008-04-20T04:14:49.96-05:00</DateLastModified>
> <TripData>
> <Trip InternalElementID="1" UniqueID="1" TripID="39358"
> TripType="OperationProfile" Audited="False"
> UnknownDriver="False" OrganizationID="1217">
> <Actual InternalElementID="2" UniqueID="2"
> UserDefinedRouteID="0" XVIN="67112663" BegOdo="0" EndOdo="0"
> BegFuel="0" EndFuel="0" BegDateTime="2008-04-19T04:00:00"
> EndDateTime="2008-04-20T04:00:00" BegLatitude="0"
> BegLongitude="0" EndLatitude="0" EndLongitude="0"
> StartingRoadwayStatus="Taxable">
> <OpProfileSession InternalElementID="3" UniqueID="3"
> StartTime="2008-04-19T04:00:00" EndTime="2008-04-20T04:00:00"
> StopDurationSeconds="86439" StopDistanceMiles="0"
> StopFuelQtyGallons="0" StopIdleDurationSeconds="0"
> StopIdleFuelQtyGallons="0" StopMoveDurationSeconds="0"
> DelayCount="0" DelayDurationSeconds="0" DelayDistanceFeet="0"
> DelayFuelQtyGallons="0" SpeedingDistanceMiles="0"
> SpeedingDurationSeconds="0" PanicCount="0"
> StateBordersCrossedCount="0" SessionDurationSeconds="86439"
> StopCount="0" StoppedAtStart="True" Mode="Unknown">
> <SpeedBracket InternalElementID="4" UniqueID="4"
> HighSpeedMPH="5" DurationSeconds="0" DistanceMiles="0"
> FuelQtyGallons="0" CoastDistanceMiles="0"
> CruiseDurationSeconds="0" CruiseDistanceMiles="0"
> CruiseFuelQtyGallons="0" BrakeCount="0"
> LowTorqueDurationSeconds="0" HighTorqueDurationSeconds="0"
> BracketNumber="0" />
> <!-- more SpeedBracket elements go in here -->
> </OpProfileSession>
> </Actual>
> </Trip>
> </TripData>
> </Trip>
> </TripExportDataObject>
>
> ///Peter
> --
> XML FAQ: http://xml.silmaril.ie/
>
date: Thu, 24 Apr 2008 07:43:01 -0700
author: Tony Girgenti tony(nospam)@lakesideos.com
|
|