Passing XML content enclosed in another xml tag to JSp file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Passing XML content enclosed in another xml tag to JSp file

sj.sjain
Hi,

I have created a xml instance in a xpl, xml that is getting generated is this

 <Messages>
  <Message>
<?xml version="1.0"><Name>Saurabh</name><age>48</age><country>India </country>   </Message>
  <action/>
  </Messages>

I am using this intance in another .xsl file on which i am displaying the content of /Messages/Message and thr is one button. Now I want to pass the contents of /Messages/Message to jsp file, which is again a valid and well formed xml.



In normal scenario we do soem thing like this in xml file

<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
    <xforms:instance>
        <a></a>
    </xforms:instance>
    <xforms:submission id="xxx" method="post"
        action="http://localhost:8882/IpAddress.jsp"/>
</xforms:model>

Please  suggest how to achieve this, as i am not getting how to call jsp for my case


Regards,
Saurabh Jain





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Passing XML content enclosed in another xml tag to JSp file

Ryan Puddephatt
Saurabh,
        Remove the XML declaration, it's incorrect because it should only
appear as the first line of a document. Secondly, I believe OPS will assume
XML as I have never had to add the XML declaration to any of my documents

Ryan

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]]
>Sent: 11 July 2006 15:18
>To: [hidden email]
>Subject: [ops-users] Passing XML content enclosed in another xml tag to JSp
>file
>
>Hi,
>
>I have created a xml instance in a xpl, xml that is getting generated is
>this
>
> <Messages>
>  <Message>
><?xml version="1.0"><Name>Saurabh</name><age>48</age><country>India
></country>   </Message>
>  <action/>
>  </Messages>
>
>I am using this intance in another .xsl file on which i am displaying the
>content of /Messages/Message and thr is one button. Now I want to pass the
>contents of /Messages/Message to jsp file, which is again a valid and well
>formed xml.
>
>
>
>In normal scenario we do soem thing like this in xml file
>
><xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
>    <xforms:instance>
>        <a></a>
>    </xforms:instance>
>    <xforms:submission id="xxx" method="post"
>        action="http://localhost:8882/IpAddress.jsp"/>
></xforms:model>
>
>Please  suggest how to achieve this, as i am not getting how to call jsp
>for my case
>
>
>Regards,
>Saurabh Jain
>
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Passing XML content enclosed in another xml tag to JSp file

sj.sjain
Hello Ryan,

My Xml is like this:-

<Root>
<Messages>

   <xml version="1.0"> <Details><Name>Saurabh</name><age>48</age><country>India
    country> </Details>
 </Messages>

</Root>

<Root>...</Root> xml instance is fromed using XPL Now I have to pass contnets of /Root/Messages ie <Details>...<Details> to JSP page there fore i have put <xml version="1.0"> in side xml.


In <Root><Meesages>tag it is simple text content but i want it to act as a well fromed xml when /Root/Messages/ is passed to XML



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: RE: Passing XML content enclosed in another xml tag to JSp file

Ryan Puddephatt
Saurabh,
        How are you passing this to the JSP?

If you are using a XPL file, OPS will add the XML declaration when you pass
it, having an <xml> element inside <Messages> does not count as an XML
declaration (so it will have no effect on the JSP page). Also having <?xml
?> element is invalid XML, try removing it

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]]
>Sent: 12 July 2006 06:19
>To: [hidden email]
>Subject: Re: RE: [ops-users] Passing XML content enclosed in another xml
>tag to JSp file
>
>Hello Ryan,
>
>My Xml is like this:-
>
><Root>
><Messages>
>
>   <xml version="1.0">
><Details><Name>Saurabh</name><age>48</age><country>India
>    country> </Details>
> </Messages>
>
></Root>
>
><Root>...</Root> xml instance is fromed using XPL Now I have to pass
>contnets of /Root/Messages ie <Details>...<Details> to JSP page there fore
>i have put <xml version="1.0"> in side xml.
>
>
>In <Root><Meesages>tag it is simple text content but i want it to act as a
>well fromed xml when /Root/Messages/ is passed to XML




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws