IgnoreStructuredDocumentTags
İçindekiler
[
Saklamak
]FindReplaceOptions.IgnoreStructuredDocumentTags property
İçeriği yoksaymayı belirten bir Boole değeri alır veya ayarlarStructuredDocumentTag . Varsayılan değerYANLIŞ .
public bool IgnoreStructuredDocumentTags { get; set; }
Notlar
Bu seçenek olarak ayarlandığındadoğru , içeriğiStructuredDocumentTag basit bir metin olarak ele alınacaktır.
Aksi takdirde,StructuredDocumentTag bağımsız Story olarak işlenecek ve her biri için değiştirme deseni ayrı ayrı aranacaktırStructuredDocumentTag , böylece desen bir çizgiyi geçerseStructuredDocumentTag , o zaman bu desen için değiştirme yapılmayacaktır.
Örnekler
Değiştirmeden etiket içeriğinin nasıl göz ardı edileceğini gösterir.
Document doc = new Document(MyDir + "Structured document tags.docx");
// Bu paragraf SDT içermektedir.
Paragraph p = (Paragraph)doc.FirstSection.Body.GetChild(NodeType.Paragraph, 2, true);
string textToSearch = p.ToString(SaveFormat.Text).Trim();
FindReplaceOptions options = new FindReplaceOptions() { IgnoreStructuredDocumentTags = true };
doc.Range.Replace(textToSearch, "replacement", options);
doc.Save(ArtifactsDir + "StructuredDocumentTag.IgnoreStructuredDocumentTags.docx");
Ayrıca bakınız
- class FindReplaceOptions
- ad alanı Aspose.Words.Replacing
- toplantı Aspose.Words