Exforsys
+ Reply to Thread
Results 1 to 5 of 5

Help to Resolve

This is a discussion on Help to Resolve within the XML forums, part of the Programming Talk category; I tried my first XML application as below. <!--Sample XML--!> <?xml version="1.0"?> <?xml-stylesheet type="text/css" href="style.css"?> <BOOKS> <BOOK> <TITLE CLASS="BLUE">WELCOME</TITLE> <AUTHOR>SAMPLE</AUTHOR> ...

  1. #1
    Ralph is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    114

    Smile Help to Resolve

    I tried my first XML application as below.
    <!--Sample XML--!>
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/css" href="style.css"?>
    <BOOKS>
    <BOOK>
    <TITLE CLASS="BLUE">WELCOME</TITLE>
    <AUTHOR>SAMPLE</AUTHOR>
    </BOOK>
    </BOOKS>

    But I got error and I could not find the error in the above program. Kindly help me to resolve the error.


  2. #2
    amitky is offline J2EE Prof. Array
    Join Date
    Dec 2007
    Location
    Bangalore
    Answers
    7

    Hi

    <!--Sample XML -->
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/css" href="style.css"?>
    <BOOKS>
    <BOOK>
    <TITLE CLASS="BLUE">WELCOME</TITLE>
    <AUTHOR>SAMPLE</AUTHOR>
    </BOOK>
    </BOOKS>


    You have wrongly closed the comment on the first line. Check the above first line for correction.


  3. #3
    Sandhya.Kishannag is offline Member Array
    Join Date
    Feb 2012
    Answers
    66
    <code>[QUOTE=amitky;410971]<!--Sample XML -->
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/css" href="style.css"?>
    <BOOKS>
    <BOOK>
    <TITLE CLASS="BLUE">WELCOME</TITLE>
    <AUTHOR>SAMPLE</AUTHOR>
    </BOOK>
    </BOOKs></code>

    The error lies in the third line of ur code the href attribute should appear before type in style tag.


  4. #4
    Sandhya.Kishannag is offline Member Array
    Join Date
    Feb 2012
    Answers
    66
    The href attribute should appear before type attribute in the style tag which is the third line of ur code.


  5. #5
    seostudent is offline Junior Member Array
    Join Date
    Apr 2012
    Answers
    8
    I thought there was supposed to be some kind of Doctype XML command? I feel a little bit self-conscious asking this but I've seen something like that on top of most XML/HTML web pages. Can someone explain?


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...