Zend_Gdata_Spreadsheets 给出“命名空间错误”;关于插入数据?
我正在尝试在我的 Google 电子表格中插入一行。虽然其他功能(例如计算行数、列数等)可以正常工作;插入一行会出现“命名空间错误”。
An exception of type DOMException was thrown, but did not get caught during the execution of the request. You will find information provided by the exception along with a stack trace below.
Stack Trace
1. at exception origin in ...\library\Zend\Gdata\App\Base.php line 220
2. at Zend_Gdata_App_Base->getDOM([object DOMDocument], 1, NULL)
in ...\library\Zend\Gdata\Spreadsheets\Extension\Custom.php line 64
3. at Zend_Gdata_Spreadsheets_Extension_Custom->getDOM([object DOMDocument])
in ...\library\Zend\Gdata\Spreadsheets\ListEntry.php line 77
4. at Zend_Gdata_Spreadsheets_ListEntry->getDOM()
in ...\library\Zend\Gdata\App\Base.php line 329
5. at Zend_Gdata_App_Base->saveXML()
in ...\library\Zend\Gdata\Spreadsheets.php line 336
6. at Zend_Gdata_Spreadsheets->insertRow(array('xxx', 'xxx', 'Normal', 'Lease', 'xxx', 'test', 'test'), '0Aoxxx2c')
I'm trying to insert a row in my Google spreadsheet. While other functions like counting rows, columns etc work fine; inserting a row gives me 'Namespace Error'.
An exception of type DOMException was thrown, but did not get caught during the execution of the request. You will find information provided by the exception along with a stack trace below.
Stack Trace
1. at exception origin in ...\library\Zend\Gdata\App\Base.php line 220
2. at Zend_Gdata_App_Base->getDOM([object DOMDocument], 1, NULL)
in ...\library\Zend\Gdata\Spreadsheets\Extension\Custom.php line 64
3. at Zend_Gdata_Spreadsheets_Extension_Custom->getDOM([object DOMDocument])
in ...\library\Zend\Gdata\Spreadsheets\ListEntry.php line 77
4. at Zend_Gdata_Spreadsheets_ListEntry->getDOM()
in ...\library\Zend\Gdata\App\Base.php line 329
5. at Zend_Gdata_App_Base->saveXML()
in ...\library\Zend\Gdata\Spreadsheets.php line 336
6. at Zend_Gdata_Spreadsheets->insertRow(array('xxx', 'xxx', 'Normal', 'Lease', 'xxx', 'test', 'test'), '0Aoxxx2c')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这篇文章是不久前发布的,但我想无论如何我都会发布它,希望能节省其他人的时间和麻烦。
我也遇到了同样的问题,经过大量调试后发现,这是由于 XML 格式错误造成的。
如果您传递的键值中包含空格,则会触发此错误。
我通过删除所有可能给 XML 解析器带来麻烦的字符来解决这个问题。
希望有帮助。
I know this post is from a while back, but I figured I'd post anyway in the hopes of saving someone else time and headaches.
I was having this same problem and after a lot of debugging it turns out that it happens due to malformed XML.
If you're passing Key values with spaces in them, it will trigger this error.
I solved it by removing all the characters that might give the XML parser trouble.
Hope that helps.