If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
I'm new to using BC3 but have used BC2 for simple stuff for a few years. I need to compare two XML files but exclude a tagged section of each file from the comparison. Is there an easy way to do this?
All 300 files have the above type entries in them.
I've read the link that was posted previously and I assumed (perhaps incorrectly) that in order to ignore the "Portlet sdk" node (which includes the <hash> and </hash>) from my XML files I should use the "Lines" technique from the URL http://www.scootersoftware.com/suppo..._unimportantv3.
If that assumption was incorrect then what technique would your recommend using?
If the assumption was correct then how do I go about doing this? I am currently stuck with being able to identify the string " <value n="id" v="Portlet sdk"/>" and select the next 2 lines (which gets everything from <value n="id" v="Portlet sdk"/> up to the </hash>. Unfortunately I end up leaving behind the first <hash>.
How do I ignore the entire node? Do I have to solve this by doing regular expressions?
Just a thought, but has anyone asked for an enhancement where a user can define a block of code to be ignored by entering the "block" of code to ignore into a multi-line text field? It's easier for me since I'm not one of those regular expression type people. I can figure out regular expression but the multi-line text field would save me a lot of time.
For the purposes of your comparison, are the opening and close <hash> and </hash> lines important? If not, you could mark them as unimportant in all cases and only compare the contents inside. If you expect them to always match, this shouldn't be an issue, since if <hash> aligned with a <nothash>, the <nothash> would still be important. You could define two basic grammars as:
"<hash>"
"</hash>"
and label both grammars as "Hash XML Node". Then mark "Hash XML Node" as unimportant in the Session Settings. Your other grammar for the Line could then be 1 line instead of two.
The issue is that the first <hash> is on its own line, so it would need its own definition but there are no distinguishing features to separate it from other <hash> nodes. Unfortunately, we do not support back references to define Portlet SDK, and then ignore the line preceding it.
We do have a wishlist item to ignore code blocks. I've added your notes to it.
Comment