Ultraedit script1/27/2024 I run it on one of my XML files and it seems to run great. Add an empty string for line termination of last line. Is there any SQL line to write into a new file? Remove the just processed record element from the array. SSqlLine += ") VALUES ('" + asValues + "'" įor (var nValue = 1 nValue < asValues.length nValue++) Var sSqlLine = "INSERT INTO `norm_export_xml`.`doc` (`" + asNames + "`" įor (var nName = 1 nName < asNames.length nName++) Create the SQL instruction line and append it to the array of SQL lines. the special concatenated name for each child element.įor (var nAssigneeChild = 0 nAssigneeChild (*?)$/,"$1")) Process the child elements of assignee element with Var asAssigneeChilds = asElements.match(/(*?)/g) Get the child elements of the assignee element. Has this assignee element the attribute source? SName += nAssigneeCount.toString(10) + "_" number must be added to the names of all these data? value must be get and names and values of its child elements and a count The assignee element must be handled special because of source attribute Process each child element of the record element.įor (var nElement = 0 nElement (*?)$/,"$1")) Has the record element child elements? Remove all whitespaces between two elements.ĪsRecords = asRecords.replace(/>\s*(*?)/g) before and all empty elements with the withspaces.ĪsRecords = asRecords.replace(/\s*|\s*|\s*]+?\/>\s*/g,"") whitespaces and the end record tag with the withspaces Remove the start record tag with the following Process one record after the other until no more left. Does the active file contain any record element? Cancel the selection and move caret back to initial position. Get all record elements as an array of strings. Get current line and column number of caret in active file. If (typeof(lumnModeOff) = "function") lumnModeOff() Įlse if (typeof() = "function") () Define the environment for this script. Code: Select all // CDATA sections are not supported by this script.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |