regarding conditional statement in xml

This is a discussion on regarding conditional statement in xml within the C Programming forums, part of the General Programming Boards category; hi all. iam using libxml for creating and editng my xml pages . now i have problem with conditional satement. ...

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    90

    regarding conditional statement in xml

    hi all.
    iam using libxml for creating and editng my xml pages .
    now i have problem with conditional satement.
    is there any conditional statements in xml.
    if it is how can i use if statement

    actually my requirement is
    if i pass a=500 to my xml file
    it will check the conditions like this
    if (a>1 && a<250)
    a=1;
    else if(a>250 && a<=500)
    a=0;
    how can i write this in xml file
    thank u in adavancee
    sree

  2. #2
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Posts
    324
    This is a C board, not a XML or HTML board. Try a search engine of your choice.

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    90
    yah i know
    but libxml is purely in c
    so i asked my query here

  4. #4
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Posts
    324
    If the LIb is coded in C doesn't mean that C programmers will know the syntax of your language is all I'm saying.

    I can understand the C code you posted, but I have no idea how to "translate" that into another language, dig?

    As far as I know you can't directly inject C code into XML or HTML. I could be wrong.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    xml is a markup language, meaning it doesn't have flow control, just formatting. If you want to make decisions, consider scripting it, for instance, using Javascript.

    And yeah, this isn't really an xml/javascript board.

  6. #6
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    Quote Originally Posted by robwhit View Post
    xml is a markup language, meaning it doesn't have flow control, just formatting. If you want to make decisions, consider scripting it, for instance, using Javascript.

    And yeah, this isn't really an xml/javascript board.
    But xsl language does have flow control... and xsl file has xml structure and can be read by xml parser...
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Usefulness of the "else if" statement
    By gn17 in forum C Programming
    Replies: 7
    Last Post: 08-12-2007, 05:19 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. XML and data exchange
    By seexml in forum C Programming
    Replies: 0
    Last Post: 04-27-2006, 03:02 PM
  4. I need help as soon as possible.
    By hyrule in forum C++ Programming
    Replies: 7
    Last Post: 11-09-2005, 04:49 PM
  5. Uh-oh! I am having a major switch problem!
    By goodn in forum C Programming
    Replies: 4
    Last Post: 11-01-2001, 03:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21