ToXmlDoc Obsolete - Replace with PrintXml which is unknown

Class library usage, coding and language questions.
palbaret
Posts: 26
Joined: Wed Jun 27, 2012 4:21 pm

ToXmlDoc Obsolete - Replace with PrintXml which is unknown

Post by palbaret » Fri Jun 30, 2017 12:58 pm

Hi,
I want to migrate to Ranorex 7.1 but I have an obsolete warning in version 6.0

My code is
ByVal tcActivity As TestCaseActivity
...
Dim xmlDoc As Ranorex.Core.FastXml.XmlDoc = New Ranorex.Core.FastXml.XmlDoc("rxlog")
Dim xmlNode As Ranorex.Core.FastXml.XmlNode = tcActivity.ToXmlNode(xmlDoc)

I have the Ranorex Warning

'Public Function ToXmlNode(doc As Ranorex.Core.FastXml.XmlDoc) As Ranorex.Core.FastXml.XmlNode' is obsolete: 'This method is deprecated. Please use PrintXml() instead.'. (BC40000)

But I don't find any PrintXml method.
Do you have any clue?

thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: ToXmlDoc Obsolete - Replace with PrintXml which is unknown

Post by Support Team » Tue Jul 04, 2017 2:20 pm

Hi, palbaret,

First of all, "XMLDoc" is obsolete, please use Ranorex.Libs.XmlDoc inside the Ranorex.Libs.Util library instead.
Furthermore, Activity.ToXMLNode(XmlDoc) is also obsolete and should just be used if really needed. PrintXML() is used internally and can't be accessed.

Thank you for your understanding.

Sincerely,
Robert