hi, I like to use ms_datatype , but the xmlns string is too long , and making the xml files huge. So , I look for using ENTITY to reduce the size . I try the method below , but failed , can any body help me out ? My try: <?xml version="1.0" encoding="gb2312"?> <!DOCTYPE root[ <!ELEMENT root ANY> <!ENTITY msdt 'xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt'> ]> <root> <myint &msdt;="int">123</myint> <myint &msdt;="int">234</myint> </root> thanks.
"smartcatiboy" wrote in message news:uMMhTgPlIHA.2368@TK2MSFTNGP03.phx.gbl... > hi, > I like to use ms_datatype , but the xmlns string is too long , and making > the xml files huge. > So , I look for using ENTITY to reduce the size . I try the method below , > but failed , can any body help me out ? > > My try: > <?xml version="1.0" encoding="gb2312"?> > <!DOCTYPE root[ > <!ELEMENT root ANY> > <!ENTITY msdt 'xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt'> > ]> > <root> > <myint &msdt;="int">123</myint> > <myint &msdt;="int">234</myint> > </root> > Had you considered this:- <root xmlns:dt="urn:schemas-microsoft-com:datatypes"> <myint dt:dt="int">123</myint> You only need to define the namespace once on a parent element and it will apply for all descendants. -- Anthony Jones - MVP ASP/ASP.NET
got it , thanks