General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Remove or replace child

  • pooh2583

    Remove or replace child

    Participants 0
    Replies 1
    Last Activity 9 years, 11 months ago


    My xmetal Tree structure is as follows,


    Derek Read

    Reply to: Remove or replace child

    No idea what your DTD allows (and it isn't clear to me where you want your document to end up) but I have to assume that what your script is trying to do is just not allowed according to the DTD.

    While rules checking is enabled (which is the default and something that distinguishes XMetaL from most other editors as it helps stop users from creating invalid markup) an author cannot normally insert markup that is invalid. This applies to APIs as well. See the section on “rules checking” in the Help as it describes the feature in a lot more detail than I have here.

    If a script needs to transition a document (temporarily) to an invalid state there is an API named ActiveDocument.RulesChecking that will do that. Just remember to turn it back on after your script finishes and has put the document back into a valid state.


  • You must be logged in to reply to this topic.

Lost Your Password?