Bonjour,
Sous oracle 10i, je génére un fichier XML en utilisant les directives XML d'Oracle. Dans le fichier de sortie, le résultat de mes requètes sont sur la même ligne (chaque record retrouvé), ce qui n'est pas très lisible : les lignes sont très longues. Y a t'il une possibilité d'avoir un retour de ligne sur chaque find de balise, et l'indentation des blocs imbriqués ?Résultat produit :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 SELECT XMLELEMENT("NavigationPointList", XMLELEMENT("NavigationPoint", XMLELEMENT("PointName", geo.POINT_NAME ), XMLELEMENT("PointKind", DECODE(geo.NAVAID_TYPE,'DESIGNATED_POINT','DESIGNATED',DECODE(geo.NAVAID_TYPE,'UNKNOWN_POINT','UNKNOWN','NAVAID_'||geo.RADIO_NAVAID_KIND))), XMLELEMENT("Position", XMLELEMENT("Latitude",ROUND((geo.DEG_LATITUDE + geo.MIN_LATITUDE/60.0 + geo.SEC_LATITUDE/3600.0),10)), XMLELEMENT("Hemisphere",DECODE(geo.HEMISPHERE,'N','NORTH','SOUTH','')), XMLELEMENT("Longitude",ROUND((geo.DEG_LONGITUDE + geo.MIN_LONGITUDE/60.0 + geo.SEC_LONGITUDE/3600.0),10)), XMLELEMENT("Direction",DECODE(geo.DIRECTION,'W','WEST','EAST','')), XMLELEMENT("MapsUsageAtcCentreList", XMLELEMENT("MapsUsageAtcCentre", XMLELEMENT("AtcCentreName", m.ATC_CENTRE_NAME ), XMLELEMENT("MapsUsage", m.MAPS_USAGE_DESCRIPTOR ) )) ) )) FROM GEO_PT geo,GRAPHICAL_POINT gp, MAPS_USAGE_TMP m WHERE gp.AIRSPACE_ENV_NAME=geo.AIRSPACE_ENV_NAME and gp.POINT_NAME#GEO_PT=geo.POINT_NAME and m.NAME=gp.NAME and m.KIND=gp.KIND and geo.AIRSPACE_ENV_NAME = 'MAASNEW';Et ce qui est souhaité :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 <NavigationPointList><NavigationPoint><PointName>ABAMI</PointName><PointKind>DESIGNATED</PointKind><Position><Latitude>51.425</Latitude><Hemisphere>NORTH</Hemisphere><Longitude>7.2805555556</Longitude><Direction></Direction><MapsUsageAtcCentreList><MapsUsageAtcCentre><AtcCentreName>MAAS</AtcCentreName><MapsUsage>default:gpt1</MapsUsage></MapsUsageAtcCentre></MapsUsageAtcCentreList></Position></NavigationPoint></NavigationPointList> <NavigationPointList><NavigationPoint><PointName>ABAMI</PointName><PointKind>DESIGNATED</PointKind><Position><Latitude>51.425</Latitude><Hemisphere>NORTH</Hemisphere><Longitude>7.2805555556</Longitude><Direction></Direction><MapsUsageAtcCentreList><MapsUsageAtcCentre><AtcCentreName>FEED</AtcCentreName><MapsUsage>feed</MapsUsage></MapsUsageAtcCentre></MapsUsageAtcCentreList></Position></NavigationPoint></NavigationPointList>Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <NavigationPointList> <NavigationPoint> <PointName>ABAMI</PointName> <PointKind>DESIGNATED</PointKind> <Position> <Latitude>51.425</Latitude> <Hemisphere>NORTH</Hemisphere> <Longitude>7.2805555556</Longitude> <Direction></Direction> <MapsUsageAtcCentreList> ...
Partager