0

why this error

I am getting this error
HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.

for a table I am making

The code is


<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" securityLevel="user" https="true">
<meta>
<author>Houyhnhnm</author>
<sampleQuery>select * from {table} </sampleQuery>
</meta>
<bindings>
<select itemPath="" produces="XML">
<execute>
<![CDATA[
var q1 = y.query('select * from social.contacts.updates where guid=me;');
var q2 = y.query('select * from social.connections.updates(0,100) where guid=me');
var results1 = q1.results;
var results2 = q2.results;
var resxml1=new XML(results1);
var resxml2=new XML(results2);
var clength1=resxml1.contact.length;
var clength2=resxml2.contact.length;
var uslength=0;
var ulength=0;
var index1=0;
var index2=0;
var index3=0;
var substr;
var retxml=new XML();

while(index1<clength1)
{
uslength=resxml1.contact[index1].updates.length;
index2=0;
while(index2<uslength)
{
ulength=resxml1.contact[index1].updates[index2].update.length;
index3=0;
while(index3<ulength)
{
substr=new string(resxml1.contact[index1].updates[index2].update[index3].text());
if(substr.match("blog")!=null)
{
//retxml+=<hentry><link>{resxml1.contact[index1].updates[index2].update[index3].link.text()}

</link><date>{resxml1.contact[index1].updates[index2].update[index3].pubDate.text()}</date><title>{resxml1.contact

[index1].updates[index2].update[index3].title.text()}</title></hentry>;
}
index3++;
}
index2++;
}
index1++;
}

index1=0;

while(index1<clength2)
{
uslength=resxml2.contact[index1].updates.length;
index2=0;
while(index2<uslength)
{
ulength=resxml2.contact[index1].updates[index2].update.length;
index3=0;
while(index3<ulength)
{
substr=new string(resxml2.contact[index1].updates[index2].update[index3].text());
if(substr.match("blog")!=null)
{
//retxml+=<hentry><link>{resxml2.contact[index1].updates[index2].update[index3].link.text()}

</link><date>{resxml2.contact[index1].updates[index2].update[index3].pubDate.text()}</date><title>{resxml2.contact

[index1].updates[index2].update[index3].title.text()}</title></hentry>;
}
index3++;
}
index2++;
}
index1++;
}


response.object=retxml;

]]>
</execute>
</select>
</bindings>
</table>


why am I getting the error

I used this in the console

use "http://houyhnhnm.wikispaces.com/file/view/houyhnhnmblogupdates.xml";select * from houyhnhnmblogupdates

please help. I plan to run this yql statement in a gadget file and return the content with styling of course. But, I need the table to work and I don't understand what is wrong with the hierarchy. unless i need to change security settings, but i am not certain, please help

by
0 Replies

Recent Posts

in YQL