我收到了解析器异常。我的价值来自网络服务价值。我将它存储在数据库中。该值有单引号,因此我用双引号替换它们。该值存储在db中。在检索值并解析它时,我收到此错误:
有人可以再次告诉我如何将双引号替换为单引号吗?
03-26 17:11:29.473: WARN/System.err(360): org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 18765: not well-formed (invalid token)
03-26 17:11:29.553: WARN/System.err(360): at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:492)
03-26 17:11:29.573: WARN/System.err(360): at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:477)
03-26 17:11:29.583: WARN/System.err(360): at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:317)
03-26 17:11:29.613: WARN/System.err(360): at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:273)
03-26 17:11:29.663: WARN/System.err(360): at com.inquest.SaxStockDocument.getEventsFromAnXML(SaxStockDocument.java:27)
03-26 17:11:29.673: WARN/System.err(360): at com.inquest.StockActivity1$StockTask.doInBackground(StockActivity1.java:323)
03-26 17:11:29.693: WARN/System.err(360): at com.inquest.StockActivity1$StockTask.doInBackground(StockActivity1.java:1)
03-26 17:11:29.773: WARN/System.err(360): at android.os.AsyncTask$2.call(AsyncTask.java:185)
03-26 17:11:29.792: WARN/System.err(360): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
03-26 17:11:29.824: WARN/System.err(360): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
03-26 17:11:29.863: WARN/System.err(360): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
03-26 17:11:29.872: WARN/System.err(360): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
03-26 17:11:29.892: WARN/System.err(360): at java.lang.Thread.run(Thread.java:1096)
03-26 17:11:30.053: WARN/InputManagerService(47): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@46d459a0
答案 0 :(得分:-2)
在解析了值
后,我用两个单引号替换了内容单引号