I have XML and PDF files in a given path. Both XML and PDF files will be named the same. Need code that will open each XML in the given path and append 2 elements. One is the path to corresponding PDF and the other is the filename of the corresponding PDF. Below is some code I started with. But, I am new to this and appreciate the help.
function test(){
var v = new XMLWriter('UTF-8', '1.0');
v.writeStartDocument(true);
v.writeElementString('test','Hello World');
v.writeEndDocument();
console.log( v.flush() );
}
test();
Thank you!