We're sorry Aspose doesn't work properply without JavaScript enabled.

# How can we set different node styles in Document

test1.docx (15.0 KB)
Hi,

we are trying to get the different replacement scenarios for Node types other than Paragraph in Document but what the change I made in Document like Bookmarkstart, Bookmarkend,Font and Run rather than this I didn’t found out other change like FieldStart,FieldSeparator,GlossaryDocument,StructuredDocumentTagRangeEnd,CommentRangeStart and soon.

Thanks,
Tharak Garsikuti.

@Tharak Unfortunately, it is not quite clear what you need to achieve. Could you please elaborate your requirements in more details and attach your input and expected output documents.
The document you have attached contains only Run nodes, there are not bookmarks, comments or SDT.

test1.docx (18.2 KB)

Thank you for the reply @alexey.noskov

we are trying to get the different replacement scenarios for Node types other than Paragraph in Code. I need to know how we can get different types of node type changes in document, whatever we change in document it considers as a Run node type. but we want this (https://reference.aspose.com/words/java/com.aspose.words/nodetype/) in Document. how can we do different node type changes in Document other than Run node type.

Thanks,
Tharak Garsikuti.

@Tharak If you need to determine node type the revision is applied to, you can use code like the following:

Document doc = new Document(@"C:\Temp\in.docx");
foreach (Revision r in doc.Revisions)
{
Console.WriteLine(r.ParentNode.NodeType);
}


Please see our documentation to learn how to work with revisions:
https://docs.aspose.com/words/net/track-changes-in-a-document/

If you need to determine whether some Node or it’s children have revisions, you can use Range.Revisions property.