|
Create a query containing your required fields then use Application.ExportXML with the query as your DataSource.
Application.ExportXML _
ObjectType:=acExportQuery, _
DataSource:="YourQuery", _
DataTarget:="Path\YourFile.xml"
The above shows the required properties. For a list of additional (optional) properties, see the Access 2003 help file for the ExportXML method.
Steve
|
|
|
|
|
Hey guys!
I'm kind of new to XML using VC++ 6.0.
I know XML DOM and XML MiniDOM from python...
and I use MSXML4.0.
anyway, I try to create an element, or a node,
and as I run my little application it carshed due to "Access violation"
the exception occures in the functions
raw_createElement(...) and raw_createNode(...)
it happens all the time, and frankly I really don't know what the heck is wrong in there....
here is a fragment of my source:
#define PHONEBOOK_NODE _T("Node")
hr= m_pDomDocument.CreateInstance("Msxml2.DOMDocument.4.0");
sprintf(node, "%ld", m_NodeID);
l_XMLNode = m_pDomDocument->createNode(l_vtType, _T(node), _T(""));
l_XMLElement = m_pDomDocument->createElement(PHONEBOOK_NODE);
where:
m_pDomDocument is IXMLDOMDocument2Ptr
l_XMLNode is IXMLDOMNodePtr
l_XMLElement is IXMLDOMElementPtr
I'll be very glad (and so my boss) if someone will be kind to
share his or her opinion about that...
thanx,
Adidas
|
|
|
|
|
adidas.levy wrote: I'm kind of new to XML using VC++ 6.0.
I know XML DOM and XML MiniDOM from python...
Are you saying you are new to C++ development? If so you are "starting" off with a much to complex project.
An "Access Violation" is not a XML/XSL problem it is a C++ problem so this question belongs in the Visual C++/MFC forum.
led mike
|
|
|
|
|
Hey,
No, I'm not new to C++ programming, I'm programming C++ for over 3 years.
I am used to program under UNIX operating systems and not under Windows.
recently I started programming under Windows...
anyway, I solved the problem, I just had an additional call to "CoInitialize()" which caused the problem....
|
|
|
|
|
Hi All
First of all thanks for your valuable time. I am new to XML and i have very basic query.I need to generate my AsP.NET MENUS through XML and i build the XML file as below
<code><?xml version="1.0" encoding="utf-8"?>
<Menus xmlns="http://tempuri.org/XYZ.xsd">
<Menu Name="Electronics">
<ChildName>TV</ChildName>
<ChildUrl>//localhost/Tv.aspx</ChildUrl>
<ChildName>Mp3 Player</ChildName>
<ChildUrl>//localhost/MP3.aspx</ChildUrl>
</Menu>
<Menu Name="Furniture">
<ChildName>Tables</ChildName>
<ChildUrl>//localhost/tables.aspx</ChildUrl>
<ChildName>Chairs</ChildName>
<ChildUrl>//localhost/chair.aspx</ChildUrl>
<ChildName>Beds</ChildName>
<ChildUrl>//localhost/beds.aspx</ChildUrl>
so on.......
</Menu>
</Menus></code>
How i can read these XML nodes values???? I am confused and i tried dom, xmltextreader etc.......I am not sure which is the best way to use and how to use. I can load XML document but after that i am not able to read these nodes values....I am using ASP.Net, VB.Net version 1.x
Please provide some good sample source code. Thanks in advance for your help....One small request please help me ASAP.
Amit
|
|
|
|
|
Define Dataset and read the XML in DataSet like
ds.readXML(FilePath)
and here you go.. you have the details do what ever you want.
there are many other ways to read the XML but this is the easiest among all.
|
|
|
|
|
Thanks for your reply. And it really helps me to move one step. Now i am facing another problem. I am able to load my menus through xml, but it is taking some time to load. Moreover my other frmaes loaded before menus load..... Any thoughts???
|
|
|
|
|
Hi,
I am sorry if this is a very basic question.
I am new to XMLs.
I am using .net XMLDocument class to operate with xml files.
I would like to know what is the significance of a namespace when parsing XMLs. what and why is a namespace used?
Thanks.
|
|
|
|
|
VSush wrote: what and why is a namespace used?
The base reason for "namespace" support in any code based language is to reduce name collisions.
so if you want an xml element named ECustom and so do I we can't use them both in a single document. However if we add a namespace then they become
VSush.ECustom
and
led-mike.ECustom
So now they are two different elements and both can be used in a single document without ambiguity.
led mike
|
|
|
|
|
Adding to led mike's answer,
Preventing name collisions is the major reason for using namespaces. Nevertheless, the grouping of names for a specific purpose is a pleasant side-affect of this. Thus, for example, you can have elements that refer to schemas, html, xslt and xml in the same document.
George
|
|
|
|
|
Hi ALL,
QUESTION: 1
___________
I have an XML file in which I've put an Image data inline, like the following.
<?xml version="1.0" encoding="utf-16"?>
<Data xmlns:dt="urn:schemas-microsoft-com:datatypes"
dt:dt="bin.base64">/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsHCAkIBwsJCQkMCwsNEBoREA8PECAXGBMaJiIo
KCYiJSQqMD0zKi05LiQlNUg1OT9BREVEKTNLUEpCTz1DREH/2wBDAQsMDBAOEB8RER9BLCUs
QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUH/wAAR
CABiAGADASIAAhEBAxEB/8QWqPcDcEmhaNC2Sik+8Vzwo/8Ahr8hSpUESTvhp+BflXfD
QfcX5UqVaTIuRfwj5UuRM/ZX5UqVdOi5V/CPlSKKceyPlSpV06Lw0PVFPwpv+Hgz/Bj/APEU
qVdNjhGg6Io+FdVVByFHypUq2ZP/2Q==</Data>
I am able to show the image in the HTML file like this.
<HTML>
<BODY>
<img src="data:image/gif;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsHCAkIBwsJCQkMCwsNEBoREA8PECAXGBMaJiIo
KCYiJSQqMD0zKi05LiQlNUg1OT9BREVEKTNLUEpCTz1DREH/2wBDAQsMDBAOEB8RER9BLCUs
QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUH/wAAR
CABiAGADASIAAhEBAxEB/8QWqPcDcEmhaNC2Sik+8Vzwo/8Ahr8hSpUESTvhp+BflXfD
QfcX5UqVaTIuRfwj5UuRM/ZX5UqVdOi5V/CPlSKKceyPlSpV06Lw0PVFPwpv+Hgz/Bj/APEU
qVdNjhGg6Io+FdVVByFHypUq2ZP/2Q=="/>
</BODY>
</HTML>
But, I'd like to bring the inline image data from XML to HTML. I am able to do this for normal text data, something like this:
<html>
<body>
<xml id="cdcat" src="cd_catalog.xml"></xml>
<table border="1" datasrc="#cdcat">
<tr>
<td><span datafld="ARTIST"></span></td>
<td><span datafld="TITLE"></span></td>
</tr>
</table>
</body>
</html>
Since I'm a newbie to XML, kindly bear if you feel this a silly question.
QUESTION: 2 - Inline Video data
_________________________________
I've embedded a Windows Media Player and able to play a .WMV file, like this:
<html>
<body>
<embed width="320" height="290" src="video.wmv"
autostart="True"
showcontrols="True" showstatusbar="False"
showdisplay="False" autorewind="True">
</embed>
</body>
</html>
How to make the Base64 encoded video data inline.
Kindly bear this lengthy question.
Thanks in advance,
Sarvan AL
|
|
|
|
|
Sarvan AL wrote: I am able to show the image in the HTML file like this.
I loaded that HTML file in both IE and Firefox and the image does NOT display, so.... what are you talking about?
led mike
|
|
|
|
|
It didn't work for me either using IE 6. The following information is interesting:
http://dean.edwards.name/weblog/2005/06/base64-ie/[^]
I believe IE 6 or less needs assistance to display base64! Other browsers don't have this problem.
-- modified at 20:07 Thursday 10th August, 2006
|
|
|
|
|
Yeah his image data is not valid. The one in the dean.edwards blog entry is valid and works in Firefox.
George L. Jackson wrote: I believe IE 6 or less needs assistance to display base64
What does "assistance" mean, an ActiveX control?
led mike
|
|
|
|
|
In the dean.edwards blog, he is using a server-based script and javascript to "correct" the base64 data to display in IE6. He presents some different approaches to solve the problem.
|
|
|
|
|
Hi Mike & Jackson,
I'm really sorry for giving an invalid image data. Now I got the stuff using XSL. This is how I did. The XML file(say, img.xml) contains the image data inline.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="img.xsl"?>
<MusicDirectors>
<musician>
<name>A R Rahman</name>
<country>India</country>
<photo>data:image/gif;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsHCAkIBwsJCQkMCwsNEBoREA8PECAXGBMaJiIo
KCYiJSQqMD0zKi05LiQlNUg1OT9BREVEKTNLUEpCTz1DREH/2wBDAQsMDBAOEB8RER9BLCUs
QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUH/wAAR
CABpAEkDASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgABBAUHAggD/8QARRAAAQMD
AgQCBQULDQEAAAAAAQIDEQAEBRIhBjFBURNxBxQiYYEVkaGx0RYXI0JSVGJyk6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3LYt7h1pDqXUoUUhaD7KoPMe6gN7/MY3h8XLNt
dLy964I8Z0hSW+/x8qCbm6dunCt1RJJJr404T3oGqbhraxu8g2xkb9VgwvYvhnxAk+8SNvfv
5VFCaeKD01gLDHWGLtWMclo27bQS24iDrG3tSOcxJPWrDSOwrz7wXxxkuF3Qyk+s2KjK7dZi
O5QfxT9B6960j77GA/sL/wDYj7aDDx18qUbUhyNIcqAq4JxqXm3LwWgudLnhOhxsKbS3oK+Z
BAKtBTq/FBBiSCK3isW4urdDDTDIQ0QpttrQR7RCVKHOVICDBMiSD7yXhpN1Y8PesWrK3G3W
w8kLbkKuAshMbdFIa2HPWVEwmAJ8SXKbzO3lwl0OpW5KVJ3EQIE9Y5T1ietBWgU9IUqB6RpU
55CgdA1bDY0tJ/JH0VyKfUe5oOOlOOtNXSOdBp7TjmFsLdndDTa1NMvOoMtslMqWZiRCm1md
hs2BJM5dv1MmtYzn9AcQf3Vr/ecrJ+goOhypUw5UqB6ee9c09AqalSoP/9k=</photo>
</musician>
</MusicDirectors>
And here is the XSL file(img.xsl)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8" />
<xsl:template match="MusicDirectors">
<html>
<body>
<font face="verdana" size="1">
<table>
<xsl:for-each select="musician">
<TR> <TD rowspan="7"> <img src="{photo}" width="75" height="75"/> </TD> </TR>
<TR> <TD height="5"> Name : </TD> <TD> <xsl:value-of select="name"/> </TD> </TR>
<TR> <TD height="5"> Country : </TD> <TD> <xsl:value-of select="country"/> </TD> </TR>
</xsl:for-each>
</table>
</font>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Now I'd like to use the same stuff for INLINE AUDIO/VIDEO data, so that the entire information would be in a single XML file.
Since IE is not supporting this Base64 encoding, I need to know how to make this IE compliant. I hope it's possible by means of Java Script. But I haven't worked on Java Script. If you have any idea, kindly share with me and let me know the importance of Embedding Inline Binary data in XML.
Sarvan AL
|
|
|
|
|
I encoded a .wmv file in to base64 format and placed as a tag in XML.
Is there any way to play that encoded video file in the browser's embeded player( any player ) ?
Which player is encoded video compatible ?
I used base64 encoding for jpg file. it is working properly. i can view the encoded jpg file in the browser. In the same way is there any possbility to play the encoded video file in the browser ?
Which encoding is optimal for video ?
What is the role of CODEC in video encoding ?
Karthik M
|
|
|
|
|
No. You can't really do that. All you havwe done is ASCII encoded the binary data and potentially added a massive overhead to the processing. You cant just past such an encoded object to a video player and it can work out what to do with it. I personally would never encode video data into base64 and then embedd it in XML. That is asking for trouble.
|
|
|
|
|
Can anybody help in getting the node name and node value from a XML to two arrays
that is nodename in one array and node value in another array. even if there is no value for a particular node then also the array of the nodename should be there in one array and the other array should be empty.
Vipin
|
|
|
|
|
Vipin Venugopal wrote: to two arrays
Arrays of what?
In what language?
On what platform?
led mike
|
|
|
|
|
If its C# you are working in, then just deserialise the XML document into a standard POCO (Plain old CLR object) and then run a loop on it to take all the data you want out and place it into an Array (or Generic List).
|
|
|
|
|
Hi All,
We need any tool/any code suggestion that can generate report of around 6lacs (or More) pages and the format of the report will be of letter.
Currently we are working with xml and xslt but we want some good replacement of this as our client dont want xml and xslt.
Information:
View : Web Based
Database : Oracle 10G
Front End Technology : ASP.NET and ASP
Note: Crystal Report is also not performaing well in this case.
Suggested Solution must provide:
1) Faster Report Generation
2) Flexible Formating options
3) Export and Import of repots for other popular formats
Any one please help.
HV
|
|
|
|
|
hiraljv wrote: 6lacs (or More) pages
what is "6lacs"?
hiraljv wrote: as our client dont want xml and xslt.
Then let the client do it themselves thier own way. If they want you to do it they don't tell you "how" to do it.
hiraljv wrote: 1) Faster Report Generation
Faster than what?
hiraljv wrote: 3) Export and Import of repots for other popular formats
Import a report? Never heard of that, normally you import the "data" used in the report, you don't import the report.
led mike
|
|
|
|
|
can attributes be null??????
|
|
|
|
|
not exactly if you will have like this
<rizwan att1="hello">
and
<rizwan>
then on accessing Second attribute you will get ("") blank stirng.
|
|
|
|