TAILIEUCHUNG - PHP Programming with PEARXML, Data, Dates, Web Services, and Web APIs - Part 5

Tên và dữ liệu. Lái xe này không nên được sử dụng cho các tài liệu có chứa cấu trúc phức tạp được xác định tại thời gian chạy. Tạo tài liệu XML với XML_Serializer Trong khi XML_Serializer là một gói phần mềm để tạo ra các tài liệu XML, nó có một cách tiếp cận hoàn toàn khác nhau từ hai gói XML_Util và XML_FastCreate. Khi làm việc với một trong những gói này, bạn đang tạo thẻ tài liệu bằng thẻ với mỗi cuộc gọi phương pháp. Khi sử dụng XML_Serializer, bạn đang gọi một phương pháp để tạo ra. | Chapter 3 names and data. This driver should not be used for documents that contain complex structures determined at run time. Creating XML Documents with XML_Serializer While XML_Serializer is a package for creating XML documents it takes a totally different approach from the last two packages XML_Util and XML_FastCreate. When working with one of these packages you are creating the document tag by tag with each method call. When using XML_Serializer you are calling one method to create the complete document at once. It will extract the raw information from an array or an object and convert it to an XML document. While this may sound inflexible when compared to the previous approaches XML_Serializer still is one of the most powerful packages when creating XML documents. It can serialize any data that you pass in as an XML document. So it can create an XML-based string representation of any data. Think of it as the XML equivalent of the built-in serialize function which lets you create a string representation of any data be it a deeply nested array or a complex tree of objects. This string representation may then be saved in a file the user session or even a database. PHP also provides an unserialize function to restore the original data from the string representation. In the second part of this chapter you will also learn about the matching XML_Unserializer class which does this for the XML documents created by XML_Serializer. The typical way to work with XML_Serializer follows these steps Include XML_Serializer and create a new instance Configure the instance using options Create the XML document Fetch the document and do whatever you want with it If you are using XML_Serializer in real-life applications it will never get any harder than this. As you only call one method to actually create the XML document you will need to pass all information that should be contained in the XML document to this method. To make life as easy as possible XML_Serializer accepts .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.