XML DOM xmlStandalone ປະສົມປະກອບ
ການອະທິບາຍແລະການນໍາໃຊ້
ປະກອບປະກອບຂອງ xmlStandalone ສາມາດກະຕຸ້ມຫຼືກັບຄືນມາກັບວ່າເອກະສານແມ່ນ standalone.
ຄຳນວຍໄວ້
documentObject.xmlStandalone
ວັນນະຄະດີ
ໃນທຸກກໍລະນີທີ່ພວກເຮົາຈະໃຊ້ເອກະສານ XML books.xmlແລະ ກົນບັນຍາ JavaScript loadXMLDoc().
ລະຫັດການສັນຍາລັກທີ່ສາມາດສະແດງ XML ວິທະຍາຂອງ XML, standalone ຂອງຂັ້ນສັນຍາລັກສະໜາມ ແລະ XML ສະບັນຍາລັກສະໜາມ:
xmlDoc=loadXMLDoc("books.xml");
document.write("XML encoding: " + xmlDoc.xmlEncoding);
document.write("<br />");
document.write("XML standalone: " + xmlDoc.xmlStandalone
);
document.write("<br />");
document.write("XML version: " + xmlDoc.xmlVersion);
document.write("<br />");
document.write("Encoding when parsing: " + xmlDoc.inputEncoding);
Output:
XML encoding: ISO-8859-1 XML standalone: false XML version: 1.0 Encoding when parsing: ISO-8859-1