Question for XML Gurus

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 2MuchMark
    Mark of 2Much.net
    • Aug 2004
    • 50977

    #1

    Question for XML Gurus

    Help! I'm stuck.

    I have an xml file that contains a parameter that looks like this

    <something></something>

    I see this plain as day in the notepad editor. But my application isn't working and when I check the .xml file in a browser, I see only this

    <something>

    with no closer. </something> portion is missing.

    BUT, if I insert any character between them like this:

    <something>1</something>

    then the browser reads it correctly.

    Is it illegal to have no character between arguments in .xml?
  • machinegunkelly
    Confirmed User
    • Jun 2003
    • 3304

    #2
    Are you sure you're seeing <something> and not <something/> as a self closing tag ?

    XML Spec converts <something></something> to <something/>

    A simple space in the element should get you around this error. ( I can't be much help after this, just something I've run into before )
    dead.

    Comment

    • just a punk
      So fuckin' bored
      • Jun 2003
      • 32393

      #3
      Indeed. The browser shows it like that.
      Obey the Cowgod

      Comment

      • 2MuchMark
        Mark of 2Much.net
        • Aug 2004
        • 50977

        #4
        Originally posted by machinegunkelly
        Are you sure you're seeing <something> and not <something/> as a self closing tag ?
        XML Spec converts <something></something> to <something/>
        Yes.

        Originally posted by machinegunkelly
        A simple space in the element should get you around this error. ( I can't be much help after this, just something I've run into before )
        Thanks for the suggestion. I tried a space, but it did not work.


        Originally posted by CyberSEO
        Indeed. The browser shows it like that.
        Do you mean it is SUPPOSED to show it like that? It is normal?

        Comment

        • myleene
          Confirmed User
          • Oct 2013
          • 906

          #5
          XML files can contain elements or attributes.

          Which kind of item is it?

          I believe this may help:
          https://stackoverflow.com/questions/...l-xml-elements

          Your application may actually handle null values differently. If that doesn't work, I would refer to the docs of the application to confirm how it handles "empty" or "null" values. It's unclear which one you wish to handle in your first post.

          Is it illegal to have no character between arguments in .xml?
          It's not illegal. But your application may not handle that correctly.

          Comment

          • PornDiscounts-V
            Confirmed User
            • Oct 2003
            • 5744

            #6
            Might depend on your parser... Is it asking for something to be in between and a \s (whitespace character) isn't good enough to return true?

            Might be that it is asking, true or false? and only "something" returns true.
            Blog Posts - Contextual Links - Hardlinks on 600+ Blog Network
            * Handwritten * 180 C Class IPs * Permanent! * Many Niches! * Bulk Discounts! GFYPosts /at/ J2Media.net

            Comment

            • zerovic
              Confirmed User
              • Apr 2010
              • 1116

              #7
              Hi,

              there's not much I can do without seeing the actual xml.. can you share the xml we are talking about?

              Cheers,
              z
              php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com

              Comment

              • k0nr4d
                Confirmed User
                • Aug 2006
                • 9231

                #8
                It's the actual contents of the XML that matter, not what your browser displays. What you see under "view source" when viewing xml in browser is what really matters.
                Mechanical Bunny Media
                Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development

                Comment

                • zerovic
                  Confirmed User
                  • Apr 2010
                  • 1116

                  #9
                  Originally posted by k0nr4d
                  It's the actual contents of the XML that matter, not what your browser displays. What you see under "view source" when viewing xml in browser is what really matters.
                  Exactly.
                  php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com

                  Comment

                  Working...