Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hiding XML attribute if no data/value exists

105497May 25 2009 — edited May 26 2009
Hi,

I have a xsd set up as following structure:
--------------
<xsd:complexType name="PersonImageType">
<xsd:attribute name="ID" type="xsd:integer"/>
<xsd:attribute name="FileName" type="xsd:string"/>
<xsd:attribute name="ErrorMessage" type="xsd:string" use="optional"/>
<xsd:attribute name="Fetched" type="xsd:string"/>
<xsd:attribute name="S1" type="xsd:string"/>
<xsd:attribute name="S2" type="xsd:string"/>
</xsd:complexType>
--------------

When I execute my BPEL process, I get the response/output as follows:

--------------
<PersonImage>
<PersonImage ID="12410276" FileName="12410276.jpg" ErrorMessage="" Fetched="Y" S1="Y" S2="Y"/>
</PersonImage>
--------------

When you observe the output, the xml attribute 'ErrorMessage' has no value in it.
I would like to :
(a) hide this attribute - when there is no data and
(b) display this attribute - when it holds any data.

Much appreciated if anyone help me to resolve this.

Thanks and Regards,
Rakesh
This post has been answered by James Taylor-Oracle on May 26 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2009
Added on May 25 2009
10 comments
1,260 views