SunQuest
           XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old November 22nd, 2002, 01:11 PM
cobasa cobasa is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 2 cobasa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XML newbie question

I'm just learning XML and this may be a really stupid question, but i'm not finding the answer.

I'm working on a recipe search in XML. The XML file is being created from a sybase db using cfm. Some of the recipes have notes while others do not. Information I'm finding about empty tags seems to be talking about something something else. Will having tags with nothing in them be a problem? Is there a suggestion anyone has of handling something like this? An example recipe is below.

Thanks!

<recipe>
<recipe_name>
TRICOLOR CASSEROLE
</recipe_name>
<yield>
4 servings
</yield>
<note>
</note>
<component>
<ctitle>
NULL
</ctitle>
<ingredients>
<item>
<name>
Turkey or chicken meat, cooked and ground
</name>
<weight>
1 lb.
</weight>
<measure>
-
</measure>
</item>
<item>
<name>
Milk
</name>
<weight>
-
</weight>
<measure>
1/2 cup
</measure>
</item>
<item>
<name>
Egg, slightly beaten
</name>
<weight>
-
</weight>
<measure>
1
</measure>
</item>
<item>
<name>
Oil, divided
</name>
<weight>
-
</weight>
<measure>
2 Tbsp.
</measure>
</item>
<item>
<name>
Salt, divided
</name>
<weight>
-
</weight>
<measure>
1/2 tsp.
</measure>
</item>
<item>
<name>
Broccoli, frozen, chopped, steamed, and drained
</name>
<weight>
10 oz.
</weight>
<measure>
1 pkg.
</measure>
</item>
<item>
<name>
Canned yams in syrup, drained and syrup reserved
</name>
<weight>
1 lb.
</weight>
<measure>
1 can
</measure>
</item>
<item>
<name>
Cinnamon, ground
</name>
<weight>
-
</weight>
<measure>
1/2 tsp.
</measure>
</item>
</ingredients>
</component>
<directions>
<step>
In medium bowl mix turkey, milk, egg, 1 Tbsp. oil, 1/4 tsp. salt. Spread 1/2 cup of mixture evenly over bottom of four 12 oz. greased oval ramekins.
</step>
<step>
In container of electric blender purée broccoli with 1/4 tsp. salt and 1 Tbsp. oil. Spoon 1/3 cup broccoli mixture evenly over turkey mixture.
</step>
<step>
Beat yams with 1/3 cup reserved syrup, cinnamon until smooth; spread evenly over broccoli mixture. Sprinkle each ramekin with additional cinnamon.
</step>
<step>
Bake ramekins in a 350°F. oven 40 minutes or until bubbly and top is partially browned.
</step>
</directions>
</recipe>

Reply With Quote
  #2  
Old November 22nd, 2002, 02:32 PM
cobasa cobasa is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 2 cobasa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i figured that i could remove the tags altogether when not used and specify zero or more instances in the dtd. If anyone has any other plans for things like this, i'm all ears.

Thanks!

Reply With Quote
  #3  
Old November 22nd, 2002, 04:50 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Empty tags should be fine. Don't worry about it.
__________________
-james

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML newbie question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway