Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 193504

Re: Basic XML parsing using E4X syntax

$
0
0

A couple of errors here:

 

1. Your XML is not well-formed as it contains non-escaped '&' characters; these should be replaced with '&'

 

2. Your XML elements are in a namespace (see 'xmlns' attribute), but your E4X query is not. You need to define the namespace, for example

var vcloud = new Namespace("http://www.vmware.com/vcloud/v1.5");

and then the query will become

System.log("test 1 : " + xmldoc.vcloud::AdminVAppRecord.@name);

 

Hope this helps,

-Ilian


Viewing all articles
Browse latest Browse all 193504

Trending Articles