HtmlReader

Overview

HtmlReader เป็นคลาสใน Aspose.Cells FOSS สําหรับ Typescript.

หมวดนี้ให้ 9 วิธีในการทํางานกับวัตถุ HtmlReader ในโปรแกรม Typescript. วิธีการที่ใช้ได้แก่: constructor, getAttribute, getElementsByTagName, getFullElement, getInnerHtml, getOuterHtml, querySelector, querySelectorAll, read. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Typescript ได้หลังจากติดตั้งแพ็คเกจ Aspose.Cells FOSS for Typscript. คุณสมบัติ: isEndTag, isSelfClosing, isStartTag, tagName, text, textContent.

Description

HtmlReader เป็นคลาสในห้องสมุด Aspose.Cells FOSS สําหรับ TypeScript ที่เปิดเผยวิธี 8 และคุณลักษณะ 6 เพื่อการใช้งานแบบโปรแกรม.

ความสามารถหลัก ประกอบด้วย: : string; : boolean; : boolean.การปฏิบัติงานเหล่านี้ทําให้ผู้พัฒนาสามารถรวมฟังก์ชัน htmlreader ได้โดยตรงกับแอปพลิเคชั่น TypeScript.

กลุ่มนี้ยังให้บริการที่ tagName property (ได้ชื่อแท็ก) isStartTag property (ได้ tag เริ่มการทํางาน) isEndTag property (ได้ tag หมด).

อินสแตนส์ถูกสร้างผ่านคอนструкเตอร์เดียว ที่เริ่มต้นวัตถุด้วยค่าตั้งค่า.

Properties

NameTypeAccessDescription
tagName: stringReadได้ชื่อของตราสัญญากับมัน.
isStartTag: booleanReadได้ตัวการเริ่มต้น.
isEndTag: booleanReadได้รับการจบตัวก็คือ.
isSelfClosing: booleanReadได้รับการปิดตัวเอง.
text: stringReadได้ข้อความมาแล้ว.
textContentstringReadได้รับเนื้อหาจากข้อความ.

Methods

SignatureDescription
constructor(html: string)เริ่มต้น HtmlReader ใหม่สําหรับรหัส HTML ที่ได้รับ.
read()booleanย้ายไปยังตอเกนต่อไปและคืน true หากต้อเก้นถูกอ่าน false ในตอนท้ายของการเข้า.
getAttribute(name: string) → `stringnull`
getOuterHtml()stringการคืน html ด้านนอก.
getInnerHtml()stringส่งกลับ html ภายใน.
querySelectorAll(selector: string)HtmlReader[]กลับตัวประกอบทั้งหมดที่ตรงกับ CSS selector ที่ให้.
querySelector(selector: string) → `HtmlReadernull`
getFullElement()stringกลับตัวเต็ม.
getElementsByTagName(tagName: string)HtmlReader[]กลับตัวทั้งหมดที่มีชื่อแท็กที่ให้.

See Also

 ภาษาไทย