Forum Stats

  • 3,770,053 Users
  • 2,253,055 Discussions
  • 7,875,284 Comments

Discussions

XML Document Generation

Aamir
Aamir Member Posts: 88 Blue Ribbon
edited Aug 7, 2012 7:00AM in General XML
Dear All

I have a requirement to generate xml document from database as per given XML schema definition. I did this by using oracle report developer to generate out put as xml document.

My question is that is there any sequence important for attribute for example

XSD has attribute
------------------------
Name
Address
phoneno
------------------------

But When i generate xml document using oracle report developer it changes the sequence of attributes like this

-------------------------
phoneno
address
name
------------------------


please guide that this wrong sequence of attribute have any problem when validating xml document with xsd.

Regards
Tagged:

Best Answer

  • odie_63
    odie_63 Member Posts: 8,439 Bronze Badge
    Accepted Answer
    XML 1.0 specifications :

    http://www.w3.org/TR/REC-xml/#sec-starttags
    The Name in the start- and end-tags gives the element's type. [Definition: The Name-AttValue pairs are referred to as the attribute specifications of the element], [Definition: with the Name in each pair referred to as the attribute name ] and [Definition: the content of the AttValue (the text between the ' or " delimiters) as the attribute value.] Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.

Answers

  • odie_63
    odie_63 Member Posts: 8,439 Bronze Badge
    please guide that this wrong sequence of attribute have any problem when validating xml document with xsd.
    No, the order of attributes is not significant. There won't be any problem when validating.
  • Aamir
    Aamir Member Posts: 88 Blue Ribbon
    Thanks dear

    Can you please provide any reference for no metter on order of attributes in xml documents

    Regards

    Aamir
  • odie_63
    odie_63 Member Posts: 8,439 Bronze Badge
    Accepted Answer
    XML 1.0 specifications :

    http://www.w3.org/TR/REC-xml/#sec-starttags
    The Name in the start- and end-tags gives the element's type. [Definition: The Name-AttValue pairs are referred to as the attribute specifications of the element], [Definition: with the Name in each pair referred to as the attribute name ] and [Definition: the content of the AttValue (the text between the ' or " delimiters) as the attribute value.] Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.
  • Aamir
    Aamir Member Posts: 88 Blue Ribbon
    thank you very much dear for your effort

    Regards

    Aamir
This discussion has been closed.