Jump to content

Is it possible to pass two different values to a single attribute in xml tag?


Recommended Posts

Hi all, This is my first question in W3Schools forum, and my question is I want to know whether it is applicable or possible to pass multiple parameter for a single attribute in xml tag?For example: <book name="Need" name="Help" price="10$"/><book name="Soon" name="Plz" price="20$/>...... Is it applicable? I know it may sound silly :Bucktooth: but if it is not possible then I'll go for any other :umnik2: option that may exist.So plz help me ASAP. Thanks in advance. :good:

Link to post
Share on other sites

No, it's not possible. But XML's tree structure allows you to represent the same data with child elements:

<book>    <name>Need</name>    <name>Help</name>    <price>10$</price></book>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...