I have a .xml file similar to the following:
HTML Code:
<Column>
<Name>FIELD1</Name>
<Title>CO.</Title>
</Column>
<Column>
<Name>FIELD2</Name>
<EditField>TextBox</EditField>
<ColumnSpan0>4</ColumnSpan0>
<Title>NORMAL</Title>
<ColumnWidth>84px</ColumnWidth>
</Column>
<Column>
<Name>FIELD3</Name>
<EditField>TextBox</EditField>
<Title>LONG</Title>
</Column>
<Column>
<Name>FIELD4</Name>
<Title>CO.</Title>
<ColumnWidth>90px</ColumnWidth>
<xGlobalFilterKey>FILLER_TEXT</xGlobalFilterKey>
</Column>
<Column>
and I want to grab all fields with the "<Name>" tag. Also, if the name tag field can be edited (bock has an additional <EditField> tag), to include it or separate it next to the name field via comma. For instance, my output file would be something along the lines of":
<Name>FIELD1</Name>
<Name>FIELD2</Name>,<EditField>TextBox</EditField>
<Name>FIELD3</Name>,<EditField>TextBox</EditField>
<Name>FIELD4</Name>
At first, I thought I could use two grep statements (one for Name and the other for EditField), but then I would have the issue of lining everything up. Any suggestions?