0

I can Parse the below XML that comes back as a string like below lets call it variable segments

var Segments = <TopologyElements>  <TopologyElement creationClassName="CommSegmentation" displayName="V2V" name="Segmentation-GROUP-VirtualMachineByVirtualDataCenter::GROUP-USER-V2V" uuid="_ccgsEIsqEeazyLadZeWfsw"/>   <TopologyElement creationClassName="EquiSegmentation" displayName="Test" name="Merge-Clusters-Test-_JJuBMIs0EeazyLadZeWfsw" uuid="_JJuBMIs0EeazyLadZeWfsw"/> </TopologyElements>
var xmlDoc = new XML(VMTurboSegments); 
default xml namespace = xmlDoc.namespace();
System.log(xmlDoc.getElementsByTagName("creationClassName"));

Then I get the error below: TypeError: Cannot find function getElementsByTagName in object

Is there something I am missing to convert the xml (as a string) to an xml document which will allow me to parse the elements?

  • Are you doing this on the client or node.js? and please, if on the client, let e4x die and use the standardized DOMParser() – Touffy Oct 07 '15 at 19:34
  • I wish but I am using VCO from VMware they dont have that --__-- that I am aware of – user2464795 Oct 07 '15 at 19:40

0 Answers0