Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
jqGridImport: importing: 'xml' works fine, but xmlstring fails...?
21/10/2010
17:35
Avatar
Mike54
Poland
Member
Members
Forum Posts: 4
Member Since:
19/10/2010
sp_UserOfflineSmall Offline

Importing XML from file works fine: (the file contains the same data that you can see below for xmlstring import)

$("#grid2").jqGrid('jqGridImport',
{
impurl:"grid_source_mini.xml",
imptype: 'xml',
xmlGrid :{config: "roots>grid", data: "roots>rows"}
});

When I want to use the same data with "xmlstring" import, nothing happens or I get

Uncaught exception: Syntax error, unrecognized expression: #

$("#grid3").jqGrid('jqGridImport',{
imptype: 'xmlstring',
 impstring: '<roots><grid><colModel><name>P1</name><sortable>false</sortable><resizable>true</resizable></colModel><colModel> <name>P2</name><sortable>false</sortable><resizable>true</resizable></colModel><colNames>Property 1</colNames><colNames>Property 2</ colNames><datatype>xml</datatype></grid><rows><row id="as1234"><cell>doc name 1</cell><cell>bla blha bla</cell></row></rows></roots>',
xmlGrid :{config: "roots>grid", data: "roots>rows"},
});

I need to send to the client a lot of configuration data in one file, including Grid config/data for several grids.

That is why I'm not using XML import, but I want to use xmlstring.

Can anyone tell me why the same data works in the first example but fails in the second?

Is there a bug in the string to doc conversion that happens in import.js?

$.jgrid.stringToDoc(o.impstring); 

Thanks for any help!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
27 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information