My Oracle Support Banner

E-IB/PC : InsertNode method of XMLDoc class not producing correct XML output (Doc ID 2090211.1)

Last updated on FEBRUARY 04, 2019

Applies to:

PeopleSoft Enterprise PT PeopleTools - Version 8.54 and later
Information in this document applies to any platform.


Tools 8.54.11
Development environment

Trying to use InsertNode Function of XML Node class. The function is not behaving as per Peoplebooks in 8.54. The sample peoplecode provide in PeopleBooks is incorrect

Local XmlDoc &inXMLDoc, &firstDoc;
Local XmlNode &childNode, &secondNode;

&firstDoc = CreateXmlDoc("<?xml version='1.0'><myroot><third><child/></third></myroot>");
&inXMLDoc = CreateXmlDoc("<?xml version='1.0'><root><first/><second/></root>");
&childNode = &firstDoc.DocumentElement.FindNode("/third");
&secondNode = &inXMLDoc.DocumentElement.FindNode("/second");

&inXMLDoc.DocumentElement.InsertNode(&childNode, &secondNode);

Above code is pasted as it is from Peoplebooks. Peoplebooks says the output from &inXMLDoc should be:

The following is the XML document before the insert:

<?xml version="1.0"?>

The following is the XML document after the insert:

<?xml version="1.0"?>

The sample code is not producing the correct results AFTER the insert


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.