Announcement

Collapse
No announcement yet.

Replacements in XML file

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replacements in XML file

    Am trying to use replacements in XML files with no success. Am using BC3.1.2 build 10221.

    I have following tag repeated in my XML files that varies because it is an id tag:
    <FlowCalcId>31940</FlowCalcId>

    I want to replace this tag using a regular expression like:
    <FlowCalcId>.*</FlowCalcId>
    Replace with
    <FlowCalcId></FlowCalcId>


    However, it is not getting ignored - have tried toggling the "Ignore Unimportant Differences" as well. If I try the Find/Search with this regular expression.

    Would appreciate some help.

    Thanks
    Akshay
    Last edited by AkshayH; 13-May-2009, 07:55 PM. Reason: Attaching my BC settings

  • #2
    You're better off creating a grammar element for your FlowCalcId node and setting the node as unimportant than trying to use replacements:
    Click on Session Settings icon (referee)
    Click the Edit Grammar... button
    Click the New... button
    element name: FlowCalcId
    category: Delimited
    text from: <FlowCalcId>
    text to: </FlowCalcId>
    Click OK
    Move new grammar element to top of list
    Click OK
    Under Importance tab, remove checkmark from new id grammar element
    Click OK
    BC v4.0.7 build 19761
    ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

    Comment


    • #3
      Replacements are used for specific pairs/matching alignment. If you want that node to be generally unimportant, then you will want to follow Michael's suggestion. If you need it to only be unimportant when <node>data</node> aligns with <node></node>, then you would use a Replacement.

      You will know when you correctly define Unimportant text when it appears Blue for differences instead of Red. Blue text can be hidden by toggling on Ignore Unimportant Differences.
      Aaron P Scooter Software

      Comment

      Working...
      X