[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Default Entity when compose xml file

  • To: Michael Rys <mrys@m...>, xml-dev@l...
  • Subject: RE: Default Entity when compose xml file
  • From: jj long <longjingjun@y...>
  • Date: Fri, 28 Oct 2005 03:02:49 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=IQjJP/+nc1+xzg2Wm679YmFufKq8ukWwtpfiTjMdlR/DZcHcR6PWc30thOPNn311dp4KZgCBygpKocRmb9FeYBcdT4NpFyfp0k/XSrzBJe78xFL8EyIr3Pmaab1GF/ogAm323SnRe1/24HIhcVWQZ7lngqOe8M7s+REwmKwwrp0= ;
  • In-reply-to: <BAE415CEAA831548800F68C44E905AF5039E4684@R...>

xml default entity
hi Michael,

I agree this is one solution. Perhaps I can not use
this methods if I want to get database independent
capability. Is there any uniform methods in database
which like SQL standard to do this? Since each
database vender has it's own methods and support
different language in the database.

Thansk and Regards,

Long

--- Michael Rys <mrys@m...> wrote:

> What database system are you using? Most relational
> database systems
> provide some form of rel->XML mapping functionality
> that will take care
> of the entitization. See the XML Publishing
> functions in Oracle or DB2
> or the "FOR XML" clause in SQL Server...
> 
> In SQL Server 2005 for example, the following query
> would give you the
> required transformation (with taking care of
> entitization of <,> etc):
> 
> SELECT "User name" as "name", description
> FROM table
> FOR XML PATH('person'), ROOT('Data')
> 
> Best regards
> Michael
> 
> > -----Original Message-----
> > From: jj long [mailto:longjingjun@y...]
> > Sent: Thursday, October 27, 2005 1:22 AM
> > To: xml-dev@l...
> > Subject:  Default Entity when compose xml
> file
> > 
> > hi experts,
> > 
> > I want to retrieve data from database and compose
> all
> > of the data in to a xml file. For example:
> > Data:
> > User name     description
> > -------------------------------------
> > Philips       This is a funny guy
> > adam          Administrator
> > 
> > XML:
> > <Data>
> >     <person>
> >         <name>Philips</name>
> >         <description>This is a funny
> guy</description>
> >     </person>
> >     <person>
> >         <name>adam</name>
> >         <description>Administrator</description>
> >     </person>
> > </Data>
> > 
> > My problem is:
> > Sometims, there are <,>,& or other character in
> the
> > data and these character can not directly used in
> xml
> > file.
> > 
> > What is your suggestion from your expierence?
> > 
> > One solution I am thinking about is:
> > Replace <,>,& and other characters that can not
> used
> > directly in xml data with &lt;, &gt;,&amp; and etc
> in
> > the data before I compose the xml file.
> > 
> > An other problem is risen here. Are these entities
> > been defined as default entity in the parser
> (Xerces)?
> > I.e.: can I do not define these entities in the
> xml
> > file?
> > 
> > Thanks,
> > 
> > Long
> > 
> > 
> > 
> > __________________________________
> > Yahoo! FareChase: Search multiple travel sites in
> one click.
> > http://farechase.yahoo.com
> > 
> >
>
-----------------------------------------------------------------
> > The xml-dev list is sponsored by XML.org
> <http://www.xml.org>, an
> > initiative of OASIS <http://www.oasis-open.org>
> > 
> > The list archives are at
> http://lists.xml.org/archives/xml-dev/
> > 
> > To subscribe or unsubscribe from this list use the
> subscription
> > manager:
> <http://www.oasis-open.org/mlmanage/index.php>
> 
> 
>
-----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org
> <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at
> http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the
> subscription
> manager:
> <http://www.oasis-open.org/mlmanage/index.php>
> 
> 



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.