TAILIEUCHUNG - Professional Information Technology-Programming Book part 105

Tham khảo tài liệu 'professional information technology-programming book part 105', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | To demonstrate the use of string boundaries look at the following example. Valid XML documents begin with xml and likely have additional attributes possibly a version number as in xml version . Following is a simple test to check whether text is an XML document xml version- encoding UTF-8 wsdl definitions targetNamespace- http xmlns impl http xmlns intf http xmlns apachesoap http xml-soap xml. xml version encoding UTF-8 wsdl definitions targetNamespace http xmlns impl http xmlns intf http xmlns apachesoap http xml-soap The pattern appeared to work. xml matches xml . matches any other text zero or more instances of . and matches the end . But this is a very inaccurate test. Look at the example that follows the same pattern is being used to match text with extraneous text before the XML opening This is bad real bad xml version- encoding UTF-8 wsdl definitions targetNamespace http xmlns impl http xmlns intf http xmlns apachesoap http xml-soap xml. This is bad real bad xml version encoding UTF-8 wsdl definitions targetNamespace http xmlns impl http xmlns intf http xmlns apachesoap http xml-soap The pattern xml . matched the second line of the text. And although the opening XML tag may in fact be on the second line of text this example is definitely invalid and processing the text as XML could cause all sorts of problems . What is needed is a test that ensures that the opening XML tag is the first actual text in the string and that s a perfect job for the A metacharacter as seen next xml version- encoding UTF-8 wsdl definitions targetNamespace http xmlns impl http xmlns intf http xmlns apachesoap http xml-soap A s xml. xml version encoding UTF-8 wsdl definitions targetNamespace http xmlns impl http xmlns intf http xmlns .

Đã 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.