bianca.pira
New Member
- Joined
- Jul 20, 2010
- Messages
- 6
Hi!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
<o
></o
>
I need to build a macro that creates a xml file, having information taken from the excel file and from a database. The fact is that i have an example that shows me how the final file should look like. <o
></o
>
<o
></o
>
An example of a final xml source looks like this one:<o
></o
>
<!--
<root xmlns="<?XML:NAMESPACE PREFIX = [default] <u NS = "<u" /><root xmlns="<u">http://www.blablabla.com<U>/bla1"</U> , xmlns:xsi = "http://www.blabla2/bla2"><o
></o
></ROOT>
<root xmlns="<u"><header><tag1>'<header><o
></o
></header></root>
</tag1><root xmlns="<u"><header><tag1>'<tag1>lalala</tag1><o
></o
></header></root>
</tag1><root xmlns="<u"><header><tag1>'<tag2></tag1><tag2>tralala</tag2> <o
></o
></tag2></header></root>
<root xmlns="<u"><header><tag2>'</header><o
></o
></tag2>
</header><DataFromDB xmlns="<u">'<DataFromDB xmlns"http://www.example.com/bla1" , xmlns:xsi = "http://www.example2/bla2"> <o
></o
></DataFromDB>
<DataFromDB xmlns="<u">'<series attr1= "1" attr2 = "2"><o
></o
>
<row atrr2="2" , attr1="1"></row><ROW atrr2="4" , attr1="3"></ROW><ROW atrr2="6" , attr1="5"></ROW></DataFromDB></root>' </series><o
></o
>
<DataFromDB xmlns="<u">'<series attr1= "1" attr2 = "2"><o
></o
>
<row atrr2="2" , attr1="1"></row><ROW atrr2="4" , attr1="3"></ROW><ROW atrr2="6" , attr1="5"></ROW></DataFromDB>' </series><o
></o
>
<DataFromDB xmlns="<u">'<series attr1= "1" attr2 = "2"><o
></o
>
<row atrr2="2" , attr1="1"></row><ROW atrr2="4" , attr1="3"></ROW><ROW atrr2="6" , attr1="5"></ROW></DataFromDB>' </series><o
></o
>
'</DataFromDB><o
></o
>
'<root>
--><o
></o
>
So, i have managed to write a vb procedure that creates the exact document, except adding the xmlns and xmlns:xsi atrribuites to the "root" and to "DataFromDB" tags.<o
></o
>
I don't know how to do that. <o
></o
>
I use Microsoft XML, v5.0.<o
></o
>
Could you please help me with this problem?<o
></o
>
</root><DataFromDB xmlns="<u"><series attr1="1" attr2="2"></DATAFROMDB></ROOT>
</series></DataFromDB>




<o


I need to build a macro that creates a xml file, having information taken from the excel file and from a database. The fact is that i have an example that shows me how the final file should look like. <o


<o


An example of a final xml source looks like this one:<o


<!--
<root xmlns="<?XML:NAMESPACE PREFIX = [default] <u NS = "<u" /><root xmlns="<u">http://www.blablabla.com<U>/bla1"</U> , xmlns:xsi = "http://www.blabla2/bla2"><o


<root xmlns="<u"><header><tag1>'<header><o


</tag1><root xmlns="<u"><header><tag1>'<tag1>lalala</tag1><o


</tag1><root xmlns="<u"><header><tag1>'<tag2></tag1><tag2>tralala</tag2> <o


<root xmlns="<u"><header><tag2>'</header><o


</header><DataFromDB xmlns="<u">'<DataFromDB xmlns"http://www.example.com/bla1" , xmlns:xsi = "http://www.example2/bla2"> <o


<DataFromDB xmlns="<u">'<series attr1= "1" attr2 = "2"><o


<row atrr2="2" , attr1="1"></row><ROW atrr2="4" , attr1="3"></ROW><ROW atrr2="6" , attr1="5"></ROW></DataFromDB></root>' </series><o


<DataFromDB xmlns="<u">'<series attr1= "1" attr2 = "2"><o


<row atrr2="2" , attr1="1"></row><ROW atrr2="4" , attr1="3"></ROW><ROW atrr2="6" , attr1="5"></ROW></DataFromDB>' </series><o


<DataFromDB xmlns="<u">'<series attr1= "1" attr2 = "2"><o


<row atrr2="2" , attr1="1"></row><ROW atrr2="4" , attr1="3"></ROW><ROW atrr2="6" , attr1="5"></ROW></DataFromDB>' </series><o


'</DataFromDB><o


'<root>
--><o


So, i have managed to write a vb procedure that creates the exact document, except adding the xmlns and xmlns:xsi atrribuites to the "root" and to "DataFromDB" tags.<o


I don't know how to do that. <o


I use Microsoft XML, v5.0.<o


Could you please help me with this problem?<o


</root><DataFromDB xmlns="<u"><series attr1="1" attr2="2"></DATAFROMDB></ROOT>
</series></DataFromDB>
Last edited: