471,321 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

how to introduce intellisense

I have an XML file with a deep heirarchy for which I generate an xsd.
Using this xsd I generate C# classes.
Then I deserialize the xml to generate an object of the root element.
Typically this object would contain an array of it's child elements and

each of these child elements will in turn contain an array of it's
child elements and so on.
The XML file is as follows
<?xml version="1.0" encoding="utf-8" ?>
<Nunit
xmlns="http://abc.com"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://xyze.com first2.xsd" >
<!-- UseCase[0] -->
<UseCase useCaseId="1010" name="Administrate Dealer Data">
<TestCase testCaseId="0" name="checkfordocumenttypes">
<Add AddId="0" param="dtype" value="FC" />
<Add AddId="1" param="userid" value="GUID" />
<Add AddId="2" param="ruid" value="" />
<Add AddId="3" param="docid" value="Madhu" />
</TestCase>
<TestCase testCaseId="1" name="checkfirstrowrule">
<Add AddId="0" param="" value="" />
<Add AddId="1" param="" value="" />
<Add AddId="2" param="" value="" />
<Add AddId="3" param="" value="" />
</TestCase>
</UseCase>
</nunit>
Now suppose I have an object of the root element type nunit, called
'test'.
I want intellisense to be invoked such that on using period after test,

all the "name" attributes of the "UseCase"
elements must be displayed, something like
test.
Administrate Dealer Data
Administrate LocalCarts
GetWebServices
and similarly
test.Administrate DealerData.

checkfordocumenttypes

checkfirstrowrule


How can such functionality be achieved?
Please help.

Feb 3 '06 #1
1 1108

<vi*********@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
I have an XML file with a deep heirarchy for which I generate an xsd.
Using this xsd I generate C# classes.
Then I deserialize the xml to generate an object of the root element.
Typically this object would contain an array of it's child elements and

each of these child elements will in turn contain an array of it's
child elements and so on.
The XML file is as follows
<?xml version="1.0" encoding="utf-8" ?>
<Nunit
xmlns="http://abc.com"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://xyze.com first2.xsd" >
<!-- UseCase[0] -->
<UseCase useCaseId="1010" name="Administrate Dealer Data">
<TestCase testCaseId="0" name="checkfordocumenttypes">
<Add AddId="0" param="dtype" value="FC" />
<Add AddId="1" param="userid" value="GUID" />
<Add AddId="2" param="ruid" value="" />
<Add AddId="3" param="docid" value="Madhu" />
</TestCase>
<TestCase testCaseId="1" name="checkfirstrowrule">
<Add AddId="0" param="" value="" />
<Add AddId="1" param="" value="" />
<Add AddId="2" param="" value="" />
<Add AddId="3" param="" value="" />
</TestCase>
</UseCase>
</nunit>
Now suppose I have an object of the root element type nunit, called
'test'.
I want intellisense to be invoked such that on using period after test,

all the "name" attributes of the "UseCase"
elements must be displayed, something like
test.
Administrate Dealer Data
Administrate LocalCarts
GetWebServices
and similarly
test.Administrate DealerData.
How could that work even in principle since identifiers cannot contain
spaces?
How can such functionality be achieved?
It can't - intellisense handles types not content.
Please help.


If you actually intend your xml to be a metalanguage rather than data then
you need to write your own XML to code translator - See CodeDom
(http://www.15seconds.com/issue/020917.htm) although I think that you'll
still have to do something about the spaces.
Feb 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by andrew.queisser | last post: by
6 posts views Thread by Stefan Kronberg | last post: by
1 post views Thread by Christopher W. Douglas | last post: by
reply views Thread by Jim | last post: by
1 post views Thread by Yaron | last post: by
9 posts views Thread by Ulf Lindback | last post: by
5 posts views Thread by wal | last post: by
3 posts views Thread by Travis | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.