Autore Topic: SAXParser e problemi con tag "a capo"  (Letto 468 volte)

Offline sircotra

  • Nuovo arrivato
  • *
  • Post: 2
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Vodafone Smart 858
  • Sistema operativo:
    Windows XP Pro
SAXParser e problemi con tag "a capo"
« il: 13 Ottobre 2011, 10:10:42 CEST »
0
Ciao a tutti,
ho un serio problema con SAXParser e spero possiate aiutarmi. L'applicazione che sto scrivendo per la tesi legge un file KML (derivato da XML per le mappe) ed estrae le coordinate di un placemark. Il mio problema è la lettura di tag in cui le informazioni sono scritte "a capo", cioè:

Codice (XML): [Seleziona]
<coordinates>x1,y1,z1 x2,y2,z2</coordinates>
così funziona, mentre,

Codice (XML): [Seleziona]
<coordinates>
x1,y1,z1 x2,y2,z2
</coordinates>

non funziona e SAXParser mi da errore.

Google Earth produce i file KML nel secondo formato e dovrei modificarli ogni volta, per quale motivo l'andare a capo da tutti questi problemi?

Saluti

Fabio

Offline Ricky`

  • Amministratore
  • Utente storico
  • *****
  • Post: 3489
  • Respect: +507
    • Github
    • Google+
    • rciovati
    • Mostra profilo
Re:SAXParser e problemi con tag "a capo"
« Risposta #1 il: 13 Ottobre 2011, 10:41:56 CEST »
0
non funziona e SAXParser mi da errore.

Che errore ti da?

Offline sircotra

  • Nuovo arrivato
  • *
  • Post: 2
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    Vodafone Smart 858
  • Sistema operativo:
    Windows XP Pro
Re:SAXParser e problemi con tag "a capo"
« Risposta #2 il: 13 Ottobre 2011, 11:05:42 CEST »
0
A schermo mi compare la scritta che il "processo ha causato un errore" e il tasto "Force close"
Il logcat è questo:

Codice: [Seleziona]
10-13 11:02:03.800: DEBUG/AndroidRuntime(576): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
10-13 11:02:03.800: DEBUG/AndroidRuntime(576): CheckJNI is ON
10-13 11:02:04.271: DEBUG/AndroidRuntime(576): --- registering native functions ---
10-13 11:02:04.280: INFO/jdwp(576): received file descriptor 20 from ADB
10-13 11:02:04.700: DEBUG/ddm-heap(576): Got feature list request
10-13 11:02:05.360: DEBUG/AndroidRuntime(576): Shutting down VM
10-13 11:02:05.360: DEBUG/dalvikvm(576): DestroyJavaVM waiting for non-daemon threads to exit
10-13 11:02:05.370: DEBUG/dalvikvm(576): DestroyJavaVM shutting VM down
10-13 11:02:05.370: DEBUG/dalvikvm(576): HeapWorker thread shutting down
10-13 11:02:05.370: DEBUG/dalvikvm(576): HeapWorker thread has shut down
10-13 11:02:05.380: DEBUG/jdwp(576): JDWP shutting down net...
10-13 11:02:05.380: DEBUG/jdwp(576): +++ peer disconnected
10-13 11:02:05.380: INFO/dalvikvm(576): Debugger has detached; object registry had 1 entries
10-13 11:02:05.392: DEBUG/dalvikvm(576): VM cleaning up
10-13 11:02:05.410: DEBUG/dalvikvm(576): LinearAlloc 0x0 used 665652 of 4194304 (15%)
10-13 11:02:05.891: DEBUG/AndroidRuntime(586): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
10-13 11:02:05.891: DEBUG/AndroidRuntime(586): CheckJNI is ON
10-13 11:02:06.190: DEBUG/AndroidRuntime(586): --- registering native functions ---
10-13 11:02:06.200: INFO/jdwp(586): received file descriptor 20 from ADB
10-13 11:02:06.530: DEBUG/ddm-heap(586): Got feature list request
10-13 11:02:07.090: INFO/ActivityManager(53): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=it.gmaps/.TematicMap }
10-13 11:02:07.161: WARN/UsageStats(53): Something wrong here, didn't expect com.android.launcher to be paused
10-13 11:02:07.190: DEBUG/AndroidRuntime(586): Shutting down VM
10-13 11:02:07.190: DEBUG/dalvikvm(586): DestroyJavaVM waiting for non-daemon threads to exit
10-13 11:02:07.221: DEBUG/dalvikvm(586): DestroyJavaVM shutting VM down
10-13 11:02:07.221: DEBUG/dalvikvm(586): HeapWorker thread shutting down
10-13 11:02:07.221: DEBUG/dalvikvm(586): HeapWorker thread has shut down
10-13 11:02:07.232: DEBUG/jdwp(586): JDWP shutting down net...
10-13 11:02:07.232: DEBUG/jdwp(586): +++ peer disconnected
10-13 11:02:07.232: INFO/dalvikvm(586): Debugger has detached; object registry had 1 entries
10-13 11:02:07.240: DEBUG/dalvikvm(586): VM cleaning up
10-13 11:02:07.250: DEBUG/dalvikvm(586): LinearAlloc 0x0 used 676828 of 4194304 (16%)
10-13 11:02:07.352: INFO/ActivityManager(53): Start proc it.gmaps for activity it.gmaps/.TematicMap: pid=594 uid=10026 gids={3003, 1015}
10-13 11:02:07.430: INFO/jdwp(594): received file descriptor 20 from ADB
10-13 11:02:07.530: DEBUG/ddm-heap(594): Got feature list request
10-13 11:02:07.750: DEBUG/dalvikvm(30): GC freed 320 objects / 12400 bytes in 393ms
10-13 11:02:07.971: DEBUG/dalvikvm(30): GC freed 57 objects / 2528 bytes in 209ms
10-13 11:02:08.131: DEBUG/dalvikvm(30): GC freed 2 objects / 56 bytes in 164ms
10-13 11:02:08.420: ERROR/ActivityThread(594): Failed to find provider info for com.google.settings
10-13 11:02:08.420: ERROR/ActivityThread(594): Failed to find provider info for com.google.settings
10-13 11:02:08.440: ERROR/ActivityThread(594): Failed to find provider info for com.google.settings
10-13 11:02:08.650: DEBUG/LocationManager(594): Constructor: service = android.location.ILocationManager$Stub$Proxy@437af2c8
10-13 11:02:08.660: WARN/GpsLocationProvider(53): Duplicate add listener for uid 10026
10-13 11:02:08.660: DEBUG/GpsLocationProvider(53): setMinTime 0
10-13 11:02:08.660: DEBUG/GpsLocationProvider(53): startNavigating
10-13 11:02:08.870: DEBUG/qemud(35): fdhandler_accept_event: accepting on fd 10
10-13 11:02:08.870: DEBUG/qemud(35): created client 0x1ed98 listening on fd 15
10-13 11:02:08.870: DEBUG/qemud(35): client_fd_receive: attempting registration for service 'sensors'
10-13 11:02:08.870: DEBUG/qemud(35): client_fd_receive:    -> received channel id 18
10-13 11:02:08.943: DEBUG/qemud(35): client_registration: registration succeeded for client 18
10-13 11:02:09.020: DEBUG/qemud(35): fdhandler_event: disconnect on fd 15
10-13 11:02:09.020: DEBUG/SensorManager(594): found sensor: Goldfish 3-axis Accelerometer, handle=0
10-13 11:02:09.140: INFO/MapActivity(594): Handling network change notification:CONNECTED
10-13 11:02:09.140: ERROR/MapActivity(594): Couldn't get connection factory client
10-13 11:02:09.400: DEBUG/dalvikvm(594): GC freed 3687 objects / 320400 bytes in 119ms
10-13 11:02:09.720: DEBUG/dalvikvm(594): GC freed 758 objects / 239616 bytes in 164ms
10-13 11:02:09.801: INFO/ActivityManager(53): Displayed activity it.gmaps/.TematicMap: 2612 ms (total 2612 ms)
10-13 11:02:13.511: WARN/InputManagerService(53): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4391dcb8
10-13 11:02:16.200: DEBUG/AndroidRuntime(594): Shutting down VM
10-13 11:02:16.200: WARN/dalvikvm(594): threadid=3: thread exiting with uncaught exception (group=0x4001aa28)
10-13 11:02:16.200: ERROR/AndroidRuntime(594): Uncaught handler: thread main exiting due to uncaught exception
10-13 11:02:16.231: ERROR/AndroidRuntime(594): java.util.NoSuchElementException
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at java.util.StringTokenizer.nextToken(StringTokenizer.java:298)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at it.gmaps.GPSMap$PolyLivelloOverlay.salto(GPSMap.java:319)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at it.gmaps.GPSMap$PolyLivelloOverlay.draw(GPSMap.java:338)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at com.google.android.maps.Overlay.draw(Overlay.java:179)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:42)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at com.google.android.maps.MapView.onDraw(MapView.java:476)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.View.draw(View.java:6274)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.View.draw(View.java:6277)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.widget.FrameLayout.draw(FrameLayout.java:352)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.View.draw(View.java:6277)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.widget.FrameLayout.draw(FrameLayout.java:352)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.View.draw(View.java:6277)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.widget.FrameLayout.draw(FrameLayout.java:352)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1883)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewRoot.draw(ViewRoot.java:1332)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewRoot.performTraversals(ViewRoot.java:1097)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1613)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.os.Looper.loop(Looper.java:123)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at android.app.ActivityThread.main(ActivityThread.java:4203)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at java.lang.reflect.Method.invokeNative(Native Method)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at java.lang.reflect.Method.invoke(Method.java:521)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
10-13 11:02:16.231: ERROR/AndroidRuntime(594):     at dalvik.system.NativeStart.main(Native Method)
10-13 11:02:16.261: INFO/Process(53): Sending signal. PID: 594 SIG: 3
10-13 11:02:16.261: INFO/dalvikvm(594): threadid=7: reacting to signal 3
10-13 11:02:16.261: ERROR/dalvikvm(594): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
10-13 11:02:20.440: DEBUG/dalvikvm(93): GC freed 2589 objects / 130512 bytes in 124ms
10-13 11:02:29.750: INFO/Process(594): Sending signal. PID: 594 SIG: 9
10-13 11:02:29.780: INFO/ActivityManager(53): Process it.gmaps (pid 594) has died.
10-13 11:02:29.790: WARN/GpsLocationProvider(53): Unneeded remove listener for uid 1000
10-13 11:02:29.790: DEBUG/GpsLocationProvider(53): stopNavigating
10-13 11:02:29.800: INFO/WindowManager(53): WIN DEATH: Window{43965408 it.gmaps/it.gmaps.TematicMap paused=false}
10-13 11:02:29.870: WARN/UsageStats(53): Unexpected resume of com.android.launcher while already resumed in it.gmaps
10-13 11:02:29.930: WARN/InputManagerService(53): Got RemoteException sending setActive(false) notification to pid 594 uid 10026

Tuttavia se modifico il file KML, come scritto sopra, tutto va senza problemi...