Hello,
I'll try to explain this the best I can. I am using VS2005/c# and this
is a web app. I have some data in the format of:
Ford Focus 2000
Ford Focus 2001
Ford Focus 2002
Ford Mustang 2004
Ford Mustang 2005
Dodge Ram 2003
Dodge Ram 2004
Dodge Ram 2005
Dodge Ram 2006
I am trying to create an XML file from this data that would look
something like.
<subgroup1 text = "Ford">
<subgroup2 text = "Focus">
<subgroup2a text = "2000">
</subgroup2a>
<subgroup2b text = "2001">
</subgroup2b>
</subgroup2>
</subgroup1>
I was thinking I would need to create something like three variables
and then loop through it and see if the next line of data matched the
previous and if not what value changed. I am just wondering if there
is a better way.
Thanks,
Greg 6 1106
Wouldn't a better XML structure look more like:
<cars>
<car>
<make>Ford</make>
<model>Focus</model>
<year>2000</year>
</car>
<car>
<make>Ford</make>
<model>Focus</model>
<year>2001></year>
</car>
<car>
Hi
Lets make the thing simple....Move data to a DBTable.... to get it
filtered... SELECT * from table WHERE ****
Hope you like it...
Thanks
-Srinivas.
hartbypass wrote:
Hello,
I'll try to explain this the best I can. I am using VS2005/c# and this
is a web app. I have some data in the format of:
Ford Focus 2000
Ford Focus 2001
Ford Focus 2002
Ford Mustang 2004
Ford Mustang 2005
Dodge Ram 2003
Dodge Ram 2004
Dodge Ram 2005
Dodge Ram 2006
I am trying to create an XML file from this data that would look
something like.
<subgroup1 text = "Ford">
<subgroup2 text = "Focus">
<subgroup2a text = "2000">
</subgroup2a>
<subgroup2b text = "2001">
</subgroup2b>
</subgroup2>
</subgroup1>
I was thinking I would need to create something like three variables
and then loop through it and see if the next line of data matched the
previous and if not what value changed. I am just wondering if there
is a better way.
Thanks,
Greg
This is also a simple solution !!!
liked it!!
Thanks
-Srinivas.
Peter Bradley wrote:
Wouldn't a better XML structure look more like:
<cars>
<car>
<make>Ford</make>
<model>Focus</model>
<year>2000</year>
</car>
<car>
<make>Ford</make>
<model>Focus</model>
<year>2001></year>
</car>
<car>
.
.
.
</car>
</cars>
or perhaps:
<cars>
<car make="Ford" model="Focus" year="2000" />
<car make="Ford" model="Focus" year="2001" />
<car ...
</cars>
Depending on whether you like elements or attributes. I think I'd prefer
attributes in this case.
Just a thought. Sorry if it's not helpful.
Peter
"hartbypass " <gh***@medex.co mwrote in message
news:11******** **************@ n67g2000cwd.goo glegroups.com.. .
Hello,
I'll try to explain this the best I can. I am using VS2005/c# and this
is a web app. I have some data in the format of:
Ford Focus 2000
Ford Focus 2001
Ford Focus 2002
Ford Mustang 2004
Ford Mustang 2005
Dodge Ram 2003
Dodge Ram 2004
Dodge Ram 2005
Dodge Ram 2006
I am trying to create an XML file from this data that would look
something like.
<subgroup1 text = "Ford">
<subgroup2 text = "Focus">
<subgroup2a text = "2000">
</subgroup2a>
<subgroup2b text = "2001">
</subgroup2b>
</subgroup2>
</subgroup1>
I was thinking I would need to create something like three variables
and then loop through it and see if the next line of data matched the
previous and if not what value changed. I am just wondering if there
is a better way.
Thanks,
Greg
Thanks for the fast responses.
The data is in a database already, the end result it that I am trying
to stick it in to the tree control. So the suggested xml structures
will not work for what I need. I need to be able to See all the fords
under the ford branch and then all the focus' under the focus branch
that is under the ford branch. I guess I was looking more for code to
parse that data than suggestions on better formatting XML. Sorry if I
was not clear.
Thanks,
Greg
Duggi wrote:
Hi
Lets make the thing simple....Move data to a DBTable.... to get it
filtered... SELECT * from table WHERE ****
Hope you like it...
Thanks
-Srinivas.
hartbypass wrote:
Hello,
I'll try to explain this the best I can. I am using VS2005/c# and this
is a web app. I have some data in the format of:
Ford Focus 2000
Ford Focus 2001
Ford Focus 2002
Ford Mustang 2004
Ford Mustang 2005
Dodge Ram 2003
Dodge Ram 2004
Dodge Ram 2005
Dodge Ram 2006
I am trying to create an XML file from this data that would look
something like.
<subgroup1 text = "Ford">
<subgroup2 text = "Focus">
<subgroup2a text = "2000">
</subgroup2a>
<subgroup2b text = "2001">
</subgroup2b>
</subgroup2>
</subgroup1>
I was thinking I would need to create something like three variables
and then loop through it and see if the next line of data matched the
previous and if not what value changed. I am just wondering if there
is a better way.
Thanks,
Greg
Thanks for the fast responses.
The data is in a database already, the end result it that I am trying
to stick it in to the tree control. So the suggested xml structures
will not work for what I need. I need to be able to See all the fords
under the ford branch and then all the focus' under the focus branch
that is under the ford branch. I guess I was looking more for code to
parse that data than suggestions on better formatting XML. Sorry if I
was not clear.
Thanks,
Greg
Duggi wrote:
Hi
Lets make the thing simple....Move data to a DBTable.... to get it
filtered... SELECT * from table WHERE ****
Hope you like it...
Thanks
-Srinivas.
hartbypass wrote:
Hello,
I'll try to explain this the best I can. I am using VS2005/c# and this
is a web app. I have some data in the format of:
Ford Focus 2000
Ford Focus 2001
Ford Focus 2002
Ford Mustang 2004
Ford Mustang 2005
Dodge Ram 2003
Dodge Ram 2004
Dodge Ram 2005
Dodge Ram 2006
I am trying to create an XML file from this data that would look
something like.
<subgroup1 text = "Ford">
<subgroup2 text = "Focus">
<subgroup2a text = "2000">
</subgroup2a>
<subgroup2b text = "2001">
</subgroup2b>
</subgroup2>
</subgroup1>
I was thinking I would need to create something like three variables
and then loop through it and see if the next line of data matched the
previous and if not what value changed. I am just wondering if there
is a better way.
Thanks,
Greg
Got it....
You can do a query of data base with ORDERBY ....
SELECT "column_nam e"
FROM "table_name "
[WHERE "condition"]
ORDER BY "column_nam e" [ASC, DESC]
this will sort all the rows.. where ever there is a change in the
cartype come back to root node... Will this help???
I think you can also bind the data to the control.. with data binding
feature....Ofco urse after ORDERBY.
Thanks
-Srinivas.
hartbypass wrote:
Hello,
I'll try to explain this the best I can. I am using VS2005/c# and this
is a web app. I have some data in the format of:
Ford Focus 2000
Ford Focus 2001
Ford Focus 2002
Ford Mustang 2004
Ford Mustang 2005
Dodge Ram 2003
Dodge Ram 2004
Dodge Ram 2005
Dodge Ram 2006
I am trying to create an XML file from this data that would look
something like.
<subgroup1 text = "Ford">
<subgroup2 text = "Focus">
<subgroup2a text = "2000">
</subgroup2a>
<subgroup2b text = "2001">
</subgroup2b>
</subgroup2>
</subgroup1>
I was thinking I would need to create something like three variables
and then loop through it and see if the next line of data matched the
previous and if not what value changed. I am just wondering if there
is a better way.
Thanks,
Greg
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: N.K. |
last post by:
Hello, I'm trying to find a way to flexibly filter a column in a row
of data read from a file. I will have data type of that column, the
operation to be performed on it (like >, <, <= etc.) and the value to
compare it to stored in a database. If I'm to write it in a
procedural language it would be a big case statement like this: case
int
case <=
return (value <= compare value)
Can you think of a better way of doing it?
I was thinking...
|
by: Paul Rubin |
last post by:
Anyone know if there's code around to filter text through an external
process? Sort of like the Emacs "filter-region" command. For
example, say I have a program that reads input in English and outputs
it in Pig Latin. I want my Python script to call the program, pipe
some input into it and read the output:
english = "hello world"
pig_latin = ext_filter("pig_latin", english)
should set pig_latin to "ellohay orldway".
|
by: Alex Satrapa |
last post by:
I have a table from which I'm trying to extract certain information. For
historical reasons, we archive every action on a particular thing
('thing' is identified, funnily enough, by 'id'). So the only way to
find out the current state of a particular combination of attributes is
to "select distinct on (id, ...) ... order by date desc".
In the examples below, I've taken real output from psql and done a
global search/replace on various...
|
by: William Wisnieski |
last post by:
Hello Everyone,
I have a main form with a datasheet subform that I use to query by form.
After the user selects two criteria on the main form and clicks the
cmdShowResults button on the main form, the subform returns the records
based on the two criteria. The criteria used on the main form are values
selected in two list boxes. When the user clicks on the first list box
(lstCollege), it returns values in the second list box...
|
by: |
last post by:
hi,
i have a form on which a user can choose specific criteria such as dates
etc, in order to filter the report that is called from the form.
i do this by using the Where section of the docmd.openreport as follows
DoCmd.OpenReport stDocName, acPreview, , strWhere
where strWhere is a string dependant on the choices the user makes in the
| |
by: Patrick |
last post by:
I'm working on a contact management application, and need a hand with one
aspect...
Here's what I want to create:
------------------------------------
A form split into two parts. There is a datagrid on the left side that lists
names and perhaps a couple of other key fields. The user can click on a
record in the datagrid, which should automatically pull up details on that
record in the various text boxes and other controls on the right...
|
by: |
last post by:
Hello,
Does anyone have an idea on how I can filter the data in the gridview
control that was returned by an sql query?
I have a gridview that works fine when I populate it with data. Now I want
to look at that data and filter it based on what is in it.
I know that this could have been done with data sets and data views in
asp.net 1.1 but how is this done now in asp.net 2.0?
|
by: LDD |
last post by:
Hi Folks
I'm trying to determine a way to handle paging, filtering and sorting in a
datagrid.
If I choose to filter and sort, I'd like to return a subset. If that
resultset has more records then the number of rows I'd like to display, I'd
like to be able to load pages into the grid.
My question is, do I need to continually hit the db to get the next page of
records, or is there another method of doing with the dataset. i.e. load the
|
by: Shawn Ramirez |
last post by:
As with most web applications speed is a huge deal to me in my applications.
My customers don't really care if my app is a true 3 tier application or not,
they just want it to be faster then it was yesterday. Because of this I try
to limit my calls to the database by using a loading lookup data for a
customer and then filtering down to what I need. (I have alot of recursive
logic because of alot of tree controls).
Here is my question. ...
|
by: Kevin |
last post by:
I want to use a set of check boxes to narrow down entries on a subform. I.e.
a check box for black, red & green to describe the colors of a product. So a
use clicks Black and only black products are shown, the click green and only
black and green products are shown. There will be a large number of choices
that a user can make so I'm wondering...
can I right a bit of code or function and put in a seperate module to call
from an after...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |