![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Embed xml [Thread Next] Re: Embed xmlTo: NULL Date: 3/3/2006 6:21:00 AM wow,
really thanks guys I'm also solved -
main function which I used here is : ReplaceChild() and AppendChild()
and other part of coding which I need to do.
XmlElement newcatalogentry =
xmldoc.CreateElement("TABLE");
XmlAttribute tblwidthattr =
xmldoc.CreateAttribute("width");
tblwidthattr.Value = "100%";
newcatalogentry.SetAttributeNode(tblwidthattr);
XmlAttribute tblcspaceattr =
xmldoc.CreateAttribute("cellspacing");
tblcspaceattr.Value = "0";
newcatalogentry.SetAttributeNode(tblcspaceattr);
XmlAttribute tblcpadattr =
xmldoc.CreateAttribute("cellpadding");
tblcpadattr.Value = "0";
newcatalogentry.SetAttributeNode(tblcpadattr);
XmlAttribute newcatalogattr =
xmldoc.CreateAttribute("ID");
newcatalogattr.Value = "custctltbl2_1";
newcatalogentry.SetAttributeNode(newcatalogattr);
XmlElement firstelement =
xmldoc.CreateElement("TR");
newcatalogentry.AppendChild(firstelement);
XmlAttribute trtxtwidthattr =
xmldoc.CreateAttribute("width");
trtxtwidthattr.Value = "100%";
firstelement.SetAttributeNode(trtxtwidthattr);
XmlElement tdxe =
xmldoc.CreateElement("TD");
XmlAttribute tdtxtwidthattr =
xmldoc.CreateAttribute("width");
tdtxtwidthattr.Value = "100%";
tdxe.SetAttributeNode(tdtxtwidthattr);
firstelement.AppendChild(tdxe);
XmlNode xnode = xnod.Clone();
tdxe.AppendChild(xnode);
XmlElement lstelmt =
xmldoc.CreateElement("SELECT");
XmlAttribute sltwidthattr =
xmldoc.CreateAttribute("style");
sltwidthattr.Value = "width:91%";
lstelmt.SetAttributeNode(sltwidthattr);
XmlAttribute selidattr =
xmldoc.CreateAttribute("ID");
selidattr.Value = "custsugg" + id;
lstelmt.SetAttributeNode(selidattr);
XmlAttribute selclsattr =
xmldoc.CreateAttribute("classname");
selclsattr.Value = "drp";
lstelmt.SetAttributeNode(selclsattr);
XmlAttribute selsizeattr =
xmldoc.CreateAttribute("size");
selsizeattr.Value = "4";
lstelmt.SetAttributeNode(selsizeattr);
XmlElement tdlstelmt =
xmldoc.CreateElement("TD");
XmlAttribute tdsltwidthattr =
xmldoc.CreateAttribute("width");
tdsltwidthattr.Value = "100%";
tdlstelmt.SetAttributeNode(tdsltwidthattr);
tdlstelmt.AppendChild(lstelmt);
XmlElement trlstelmt =
xmldoc.CreateElement("TR");
XmlAttribute tridattr =
xmldoc.CreateAttribute("ID");
tridattr.Value = "custsugg" + id;
trlstelmt.SetAttributeNode(tridattr);
XmlAttribute trsltwidthattr =
xmldoc.CreateAttribute("width");
trsltwidthattr.Value = "100%";
trlstelmt.SetAttributeNode(trsltwidthattr);
XmlAttribute trposatt =
xmldoc.CreateAttribute("style");
trposatt.Value =
"position:absolute;display:none;visibility:hidden";
trlstelmt.SetAttributeNode(trposatt);
trlstelmt.AppendChild(tdlstelmt);
newcatalogentry.AppendChild(trlstelmt);
divnod.ReplaceChild(newcatalogentry, xnod);
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
