New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getSubKeyMap #37
Comments
Please send or post in gist an example of the data and code you're looking at. |
I can provide a patch to address part 1 of your issue. The second part is one I need data for. |
Hey!
Thanks for responding so soon. I am attaching a zip file with my testcase and test data.
Thanks,
Lorie
…________________________________
From: Charles Banning <notifications@github.com>
Sent: Wednesday, February 8, 2017 7:52 PM
To: clbanning/mxj
Cc: lorie131; Author
Subject: Re: [clbanning/mxj] getSubKeyMap (#37)
I can provide a patch to address your part 1 of your issue. The second part is one I need data for.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#37 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AN9CUdjbViU2n9iMhGTHOTGfH4kMA5Vlks5rah0VgaJpZM4L7PJX>.
|
Can't email attachment to GitHub issue thread - please send directly to clbanning@gmail.com |
clbanning
pushed a commit
that referenced
this issue
Feb 9, 2017
Part 1 is at tip. Waiting on your zip file. |
Please confirm that SetSubkeyFieldSeparator and SetNewvalFieldSeparator on tip address this issue. |
Hi!
Sorry for not getting back sooner. Yes, the test case is working now. Since I don't know what text will be in the file I am parsing, I will set the separator to something like ""!]?:@#" so hopefully this will reduce the chance of error to almost nil. But, I was wondering why you needed to create two functions/parameters (newvalSep and subkeySep), instead of using just the one.? Thanks for all your help!!
Lorie
…________________________________
From: Charles Banning <notifications@github.com>
Sent: Friday, February 10, 2017 3:05 AM
To: clbanning/mxj
Cc: lorie131; Author
Subject: Re: [clbanning/mxj] getSubKeyMap (#37)
Please confirm that SetSubkeyFieldSeparator and SetNewvalFieldSeparator on tip address this issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#37 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AN9CUZLh91-xg_hM5-BPB2p-DG3TQTXdks5ra9PxgaJpZM4L7PJX>.
|
It was just working two separate problems -
good suggestion I'm going to change it to a single call.
On 2/10/17 6:33 AM, lorie131 wrote:
Hi!
Sorry for not getting back sooner. Yes, the test case is working
now. Since I don't know what text will be in the file I am
parsing, I will set the separator to something like ""!]?:@#" so
hopefully this will reduce the chance of error to almost nil. But,
I was wondering why you needed to create two functions/parameters
(newvalSep and subkeySep), instead of using just the one.? Thanks
for all your help!!
Lorie
…________________________________
From: Charles Banning <notifications@github.com>
Sent: Friday, February 10, 2017 3:05 AM
To: clbanning/mxj
Cc: lorie131; Author
Subject: Re: [clbanning/mxj] getSubKeyMap (#37)
Please confirm that SetSubkeyFieldSeparator and
SetNewvalFieldSeparator on tip address this issue.
|
Hi Again!
I downloaded your latest regarding the merging of those two functions. Thanks!
Since I was having luck now with my small kml file, I decided to try it on a larger file. I seem to be having a completely unrelated problem now. It seems to originate in PathsForKey(). It is giving me the paths:
kml.Document.description.Folder.description.GroundOverlay.description
kml.Document.description.Folder.description.ScreenOverlay.description
kml.Document.description.Folder.description.Folder.description
kml.Document.description
kml.Document.description.Folder.description
kml.Document.description.Folder.description.Placemark.description
kml.Document.description.Folder.description.Document.description
But the paths that it should be giving me are:
kml.Document.description
klm.Document.Folder.description
klm.Document.Folder.Placemark.description
klm.Document.Folder.GroundOverlay.description
klm.Document.Folder.ScreenOverlay.description
klm.Document.Folder.Folder.description
klm.Document.Folder.Document.description
It looks like it is not backpedaling the "description" field when it propagates down another branch searching for other "description" paths. I am attaching the sample file and testcase. Do you want me to open a new issue on github for this so that it can be tracked?
Thanks,
Lorie
…________________________________
From: Charles Banning <notifications@github.com>
Sent: Friday, February 10, 2017 3:05 AM
To: clbanning/mxj
Cc: lorie131; Author
Subject: Re: [clbanning/mxj] getSubKeyMap (#37)
Please confirm that SetSubkeyFieldSeparator and SetNewvalFieldSeparator on tip address this issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#37 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AN9CUZLh91-xg_hM5-BPB2p-DG3TQTXdks5ra9PxgaJpZM4L7PJX>.
|
I believe this is fixed at tip - there was a breadcrumber error.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems to be a couple issues with this function.
Getting a runtime error: index out of range [recovered]
First the switch is on the length of the split string. If the length of the string array is 3 (case 3), then you can't reference vv[3] which would be the 4th element right? It must be vv[2] to access the third string.
Second, if your text has any ":" in it, it will get confused. My text had a "http://blah/blah/blah" in it. So, after I made the above change, I got the error: "unknown subkey conversion spec:..."
Basically I was trying to read in a kml file, change the description and name fields and then print it back out. I was trying to use the
paths= PathsForKey("description")
values =ValuesForPath(paths[0]).
UpdateValuesForPath(newVal, path[0], "description:"+value[0])
with a double loop in there to get all the paths and values. But, because description can have any kind of text, this will not be possible. Is there a better way of doing this?
Thanks,
Lorie
The text was updated successfully, but these errors were encountered: