Loading ...
Sorry, an error occurred while loading the content.

Replacing tags in an xml file

Expand Messages
  • ma_southwark
    HI I m a new user to NoteTab and am trying to work out ho to do the following. I want to remove all occurances of a tag from an xml file.
    Message 1 of 3 , Nov 18, 2005
    • 0 Attachment
      HI

      I'm a new user to NoteTab and am trying to work out ho to do the
      following.

      I want to remove all occurances of a tag <Contacts></Contacts> from an
      xml file. The tag has several child tags underneath it. Is this
      possible using Notetab and if so what is the replace statement I need
      to use?

      Tahnks

      Matthew
    • rpdooling
      Matthew, Try a* and check the regular expression box See Regular Expressions for NoteTab s flavors under Help. If you just want to remove
      Message 2 of 3 , Nov 18, 2005
      • 0 Attachment
        Matthew,

        Try <contacts>\a*</contacts> and check the regular expression box

        See Regular Expressions for NoteTab's flavors under Help.

        If you just want to remove everything between those tags, just leave
        replace empty. Or at most perhaps a ^p for spacing.

        rpd


        --- In notetab@yahoogroups.com, "ma_southwark" <mabbott@b...> wrote:
        >
        > HI
        >
        > I'm a new user to NoteTab and am trying to work out ho to do the
        > following.
        >
        > I want to remove all occurances of a tag <Contacts></Contacts> from an
        > xml file. The tag has several child tags underneath it. Is this
        > possible using Notetab and if so what is the replace statement I need
        > to use?
        >
        > Tahnks
        >
        > Matthew
        >
      • rpdooling
        Matthew, If you re still there, that first solution is an error because it is too greedy in regular expression parlance. Try this instead:
        Message 3 of 3 , Nov 25, 2005
        • 0 Attachment
          Matthew,

          If you're still there, that first solution is an error because it is
          too "greedy" in regular expression parlance. Try this instead:

          <Contacts>[^<]+</Contacts>

          Be sure to check the regular expression box in notetab's replace
          dialogue box.

          Good tutorial on regex with an example like your problem at:

          http://www.evolt.org/article/rating/20/22700/

          --- In notetab@yahoogroups.com, "rpdooling" <rpdooling@y...> wrote:
          >
          > Matthew,
          >
          > Try <contacts>\a*</contacts> and check the regular expression box
          >
          > See Regular Expressions for NoteTab's flavors under Help.
          >
          > If you just want to remove everything between those tags, just leave
          > replace empty. Or at most perhaps a ^p for spacing.
          >
          > rpd
          >
          >
          > --- In notetab@yahoogroups.com, "ma_southwark" <mabbott@b...> wrote:
          > >
          > > HI
          > >
          > > I'm a new user to NoteTab and am trying to work out ho to do the
          > > following.
          > >
          > > I want to remove all occurances of a tag <Contacts></Contacts> from an
          > > xml file. The tag has several child tags underneath it. Is this
          > > possible using Notetab and if so what is the replace statement I need
          > > to use?
          > >
          > > Tahnks
          > >
          > > Matthew
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.