Skip to main content

XML Question 88 Responses

Last post: 1 year, 10 months ago | Thread started: Mar 19, 10, 9:28 a.m.

RespondNew TopicDisable Images

  • GeorgesII

    let say you have this xml, is there a way to close the img node with xml while still displaying the inside src / description / caption tag
    -
    <album title="my album" description="very cool " lgpath="gallery/">
    <img src="sarde_04.jpg" description="Villa in Sardegna " caption="" />
    </album>

    Mar 19, 10, 9:28 a.m. – Permalink
  • idiots

    http://www.qbn.com/topics/625139…

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 19, 10, 9:29 a.m. – Permalink
  • GeorgesII

    so is it possible?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 19, 10, 9:46 a.m. – Permalink
  • fyoucher1

    <img src="sarde_04.jpg" description="Villa in Sardegna " caption=""> </img>

    That?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 19, 10, 9:51 a.m. – Permalink
  • 303

    The way you have it there is valid:
    <img src="sarde_04.jpg" description="Villa in Sardegna " caption="" />

    You always can run XML validator to check if you XML is OK:
    http://www.w3schools.com/XML/xml…

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 19, 10, 10:12 a.m. – Permalink
  • GeorgesII

    bump
    I think I explained it wrong,
    what I'm trying to obtain is to go from this
    <album title="my album" description="very cool " lgpath="gallery/">
    <img src="sarde_04.jpg" description="Villa in Sardegna " caption="" />
    </album>
    to
    <album title="my album" description="very cool " lgpath="gallery/">
    <img> src="sarde_04.jpg" description="Villa in Sardegna " caption="" </img>
    </album>
    I want to be able to close the <img> node

    • that's not valid. your attributes are outside the node. you'd need to make SRC, description and caption child nodes of img.monNom1/4
      child nodes of img.monNom2/4
      eg: <src>sarde_04.jpg</src>monNom3/4
      It's totally valid, but not recommendable.welded4/4
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 19, 10, 12:18 p.m. – Permalink
  • welded

    I don't understand the question. Do you mean to do so programmatically? Because, sure but it'll depend on your language (PHP, etc). I would keep it as-is, though, because it makes much more sense.

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 19, 10, 1:49 p.m. – Permalink
  • 303

    <album title="my album" description="very cool " lgpath="gallery/">
    <img>
    <src>sarde_04.jpg</src>
    <description>Villa in Sardegna</description>
    <caption></caption>
    </img>
    </album>

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 20, 10, 3:49 a.m. – Permalink
  • GeorgesII

    thanx 303, I just tried it and the syntax works but sadly the component just won't take it,
    thanks anyways,
    "I believe this case will never be fully closed"
    http://ingresstech.com/~bernard/…

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 20, 10, 6:03 a.m. – Permalink

Login or Register to respond to this

Skip to main content