Pasting Child values in Grid View?

Oxygen general issues.
bikeking8
Posts: 1
Joined: Sat Nov 22, 2014 3:20 pm

Pasting Child values in Grid View?

Post by bikeking8 »

First of all thanks for this wonderful product. I have an excel sheet with 7000+ rows that would have otherwise taken me weeks of man hours to input into this xml file.

My problem is that two fields in the xml document I'm working with have what I think are child fields, they look something like this structurally:

Code: Select all

datefield
datefield |display name | blah |
|sort name | blah |
Now, the "regular fields" I can paste info in just fine and have them come out great in the resulting XML output. But I paste the values in those columns with the child fields, and *boop!* info doesn't show up.

This is my first foray into XML editing, so be nice.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Pasting Child values in Grid View?

Post by adrian »

Hi,

In Grid mode Oxygen arranges the XML elements and attributes either as:
- table data when it detects multiple elements named identically (considered rows), each with its own fields (considered cells of that row)
- linear data when there is no element repetition

So, what you see there is a structure of "linear data", a single element, 'datefield' with two children, 'display_name' and 'sort_name'. Unfortunately linear data does not accept copy/paste operations with blocks of data, like the "table data" does. This means you have to treat each value of the linear data individually.

However, if you prefer the table data, there is a trick you could use to make the linear data into table data (at least temporarily), you could duplicate the single element. Right click on the single element (the inner 'datefield' in your case that holds the two children) and from the contextual menu pick 'Duplicate'.
Once a duplicate has been created the structure will be immediately presented as table data and you can use the usual copy/paste with blocks of data that you are used to. If you need the additional row you could keep the duplicate and just fill it with data. Otherwise, if you need to update just the fields of the one 'datefield', I would advise using only the first one and when you finish with that, you could delete the duplicate row and go back to the "linear data" structure.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply