How do I tell DOMDocument->load() what encoding I want it to use?

前端 未结 3 1253
旧巷少年郎
旧巷少年郎 2021-01-04 10:48

I search for and process XML files from elsewhere, and need to transform them with some XSLTs. No problem. Using PHP5 and the DOM library, everything\'s a snap. Worked fine,

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-04 11:24

    The ony way to specify the encoding is in the XML declaration at the start of the file:

    
    

提交回复
热议问题