Avatar

Level 1

Thank you for that reference.  I have been reading up on this code block a little because I didn't recognize the .replace() command in there.  I see it may be leveraging the EX4 extensions in acrobat.  Is that correct?  The purpose of the .replace function according to John Brinkman is: 

"Oddly, E4X refuses to process the xml processing instruction at the front of an XML fragment.  If it’s there, you will get a syntax error: “xml is a reserved identifier”.  The workaround is to remove leading processing instructions with a regular expression such as:

sXML = sXML.replace(/^[\s\S]*?(<[^\?!])/, “$1”);"  -J. Brinkman blog 22SEP2010

It seems to load the data into the form OK, but I am curious what would the string then look like in vImportXML?  I would need to understand that variable if I am to write something that leverages the data in it correct?  Thing1's and Thing2's from above are related in the XML to the same row.  That sibling relationship is something I hope to leverage. 

I can write a loop with an if statement condition that if no number matches messagebox a 'try again'.  If the loop condition matches a Thing1 in vImportXML, I am am not sure how to output a sibling Thing2 to a 'thingField2'.