Register Mark Forums Read
Go Back   PHP Vietnam Forum > Web Programming > Web Service & XML
Global Announcement

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-26-2009, 02:25 PM
tronghieu tronghieu is offline
Junior Member
 
Join Date: Dec 2008
Posts: 6
Default Lỗi với DOMDocument::loadXML() bị lỗi Start tag expected

Mình có 1 field trong dữ liệu lưu dữ liệu dưới cấu trúc XML. trong cấu trúc XML đó các trường thông tin được lưu trong các node.

Mình select nó ra và dùng DOMDocument::loadXML() để đọc nó. Sau đó đọc các node để lấy ra dữ liệu mình cần quan tâm dưới dạng mảng.

Bây giờ mình đang gập một vấn đề là với từng record. Có record load rất OK, có record thì gập các lỗi này :
Code:
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Start tag expected, '<' not found in Entity
DOMDocument::loadXML() [function.DOMDocument-loadXML]: StartTag: invalid element name in Entity
Dù mình đã remove tất các các kí tự "&, "&amp;", ";", "&#38", "\n" nhưng vẫn không ăn thua.
Mình thử echo các record bị báo lỗi đó ra, save lại dạng file xml. Sau đó dùng method DOMDocument::load() thì lại chạy như bình thường.

Không biết vấn đề của mình nằm ở đâu. Mong được sự giúp đỡ của các bạn.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +7. The time now is 10:46 PM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.