|
I am using Xml file as database. I am using xsl to trasform it. I am calling these files from vc++. it works fine on winxp . but it doesnt work on win2000. it will simply show the tables,text etc.but doesnt show any value from xml. when i tried to trasform using javascript its working fine. but i have to do it from my vc++ code.. please help.. is there any problem in win2000? b'coz sometimes it works fine.
|
|
|
|
|
I need to use XSLT to display meanigful information from my XML file .
My XML file is such that i just have elements <A> and <B> with the condition that <B> is always below <A>
<A Name="Main" >
<B Project="1101" />
<A Section="A" >
<B Size="1"/>
<B Data="Data1"/>
</A>
<A Section="B" >
<B Size="1"/>
<B Data="Data2"/>
</A>
</A>
you will find that I have no Data but all information is stored in attributes .
How do i use the "template match" and the
"value-of select" with attributes
I need output like this
My Project
Name : Main
Project : 1101
Section :A
Size: 1
Data:Data1
Section :B
Size: 1
Data:Data2
|
|
|
|
|
I have found that a lot of XSLT beginners have this same question. You need the "@" symbol (get it? "at"-symbol for "attributes"??).
eg:
<br />
<xsl:template match="A"><br />
Section: <xsl:value-of select="@Section" /><br />
Size: <xsl:value-of select="B/@Size" /><br />
Data: <xsl:value-of select="B/@Data" /><br />
</xsl:template><br />
youngpup.net
|
|
|
|
|
U can use xsl for Loop
Jeet
|
|
|
|
|
Does anyone know Xslt debugger tool that can recognize and debugge the
<msxsl:script> element and the embedded script inside it?
I used some debuggers like XMLSPY, but it consider a call to function
defined in embedded script like "<xsl:value-of
select='udf:somefunction();'>", it consider it as a not valid XPath
or variable.
I already know that <msxsl:script> element is Microsoft extension to
Xslt standards so its not expected to find alot -if not at all- of
debuggers dealing with such element, but maybe someone can guide me
here.
Thanx in advance.
|
|
|
|
|
Hi,
i have a html'ish xml that i want to transform into real html . like this:
"some plain text <bold>somebold <italic>some bold-italic text</italic> more bold </bold> more plain text"
i want to output that to html like this:
"some plain text <b>somebold <i>some bold-italic text</i> more bold </b> more plain text"
how do i do this?
ive created an xslt file that contains a match tag for each of my custom tags.
like this:
<xsl:template match="italic"><br />
<i>***<br />
<xsl:value-of select="*"/> <br />
<xsl:apply-templates select="*"/><br />
***</i><br />
</xsl:template>
the problem is that i dont know how to output the text inside the tags in a good way..
take the following sample
"<bold>hello<italic>this</italic>is a <italic>test</italic>blabla</bold>"
how can i do to make "hello","is a","blabla" to be outputted as bold text?
if i do as above with the value-of , it just outputs the whole innertext as a single string and then applies the templates..
//Roger
|
|
|
|
|
don't use value-of , get rid of that line and chage you apply-templates to select="*|text()"
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
How can I test whether a variable is a hash, array, or scalar?
I've got this complicated tree structure made up of hashes arrays and scalars, and I want to recursively print out every element.
Why is the phrase "It's none of my business" always followed by "BUT..."
|
|
|
|
|
In Perl the type of a variable is known at compile time (as indicated by the $ or @ or % prefix). Or did you mean the type of data that a reference is pointing to? In that case, use the ref function.
And BTW look at the Data::Dumper module, it might already do what you want.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
Hi,
I'm Ratnakar Pedagani. I'm a starter of XML/XSL and doing coding stuff using java, i.e basic parsing stuff. I want to do my course project and searching for that. The project should implement an XML application that is modeled on a real application and uses Java, database, and XML. I thought of doing project based on weblogs but i got no idea what is weblogs. Can you people suggest me in these lines? If at all you have your own ideas please let me know. I would be grateful to you people if you could let me know as soon as possible. Possible References makes my work much easier.
Thanking you,
Ratnakar Pedagani.
|
|
|
|
|
Anybody give me the best XMLParser for me, It should be able to do add/Edit/Delete operations on data within tags.
|
|
|
|
|
Please specify which platform.
|
|
|
|
|
Hi,
I'm working on something which must read the VB.NET project files. Is a schema or DTD availiable for it? I don't want to use CodeModel or automation/extensibilty features.
Thanks
Priyananda Shenoy
|
|
|
|
|
Is there a good tutorial for using MSXML component??
|
|
|
|
|
|
http://msdn.microsoft.com/library/en-us/xmlsdk/htm/sdk_intro_6g53.asp?frame=true
|
|
|
|
|
Hi,
I want to retreive the attribute of a specific tag at some level.
Is there any direct method to specify the tag name ,level & attribute name to retreive the value (similar to getElementbyTagName(tagname)?
Thanks
Priya
|
|
|
|
|
i am using xml file as database in my vc++ project. i want to password protect my xml file so no user can access it.
please help me
|
|
|
|
|
A XML File is a plain text file... because this cannot be password protected. You can to cryptograph it with the classes of namespace "System.Security.Cryptography" in .Net Framework or CryptoAPI (in Win32 API)
Good Luck!
|
|
|
|
|
Hi Gurus!
I have the simplest xml document (d:\\book.xml):
<?xml version="1.0"?>
<Report>
...
</Report>
I've written the small program (inserting XSL reference in the prolog):
Dim xmlDoc,pi,ref
set xmlDoc = CreateObject ("Msxml.DOMDocument")
xmlDoc.async = false
xmlDoc.resolveExternals = false
xmlDoc.load ("d:\\book.xml")
ref="type=""text/xsl"" href=""mysheet.xsl"""
set pi = xmlDoc.createProcessingInstruction("xml-stylesheet",ref)
xmlDoc.insertBefore pi,xmlDoc.childNodes.item(1)
WScript.Echo(xmlDoc.xml)
It works fine!
Next, I tried to do the same using Microsoft Visual C++:
IXMLDOMDocumentPtr XmlDocPtr;
_bstr_t bstrXMLReport(_T("d:\\book.xml");
VARIANT_BOOL vtResult;
HRESULT hr = XmlDocPtr.CreateInstance(MSXML::CLSID_DOMDocument);
if (FAILED(hr))
{
AfxMessageBox("Failed to CreateInstance(CLSID_DOMDocument)");
return;
};
XmlDocPtr->async=FALSE;
XmlDocPtr->resolveExternals=FALSE;
vtResult=XmlDocPtr->load(bstrXMLReport);
if (vtResult == VARIANT_FALSE)
{
AfxMessageBox("Failed to load XML document");
return;
};
IXMLDOMProcessingInstructionPtr pi;
_bstr_t bstrTarget(_T("xml-stylesheet"));
_bstr_t bstrData(_T("type=\"text/xsl\" href=\"mysheet.xsl\""));
pi=XmlDocPtr->createProcessingInstruction(bstrTarget,bstrData);
BSTR qqq;
pi->get_xml(&qqq);
CComVariant varRef;
IXMLDOMNodePtr pFirst,pXMLNodeCur;
XmlDocPtr->childNodes->get_item(1,&pFirst);
varRef=pFirst;
try
{
XmlDocPtr->insertBefore(pi,t);
AfxMessageBox(XmlDocPtr->xml);
}
catch(_com_error &er)
{
TCHAR szErr[MAX_PATH];
memset(szErr,0,sizeof(szErr));
_tcscpy(szErr,(LPCTSTR)er.Description());
AfxMessageBox(szErr);
};
After that, I've got the exception "The parameter is incorrect."
Why? I suspect the incorrect usage of insertBefore method.
What should I do?
Yours sincerely,
Alex Bash
|
|
|
|
|
I have a XML File with 32000 records, about 5Mb size.
How I do to load this (very fast) in Windows Forms DataGrid?
In help of .Net SDK says what I need use a XMLTextReader, but it is slow for me...
Thanks for all
|
|
|
|
|
Have you tried loading the Xml file into a DataSet and assigning it to your grid's DataSource property?
DataSet ds = new DataSet();
ds.ReadXml(<<path to xml file>>);
grid.DataSource = ds;
|
|
|
|
|
What exactly are you wanting to do with this huge XML file? Try loading it into a dataset before loading it into the DataGrid.
Matthew R. Sannes
Docsoft
Technical Marketing Specialist
www.docsoft.com
msannes@docsoft.com
|
|
|
|
|
Well...
My ISP gives 150 MB space to files and 10 MB of Database (MSDE).
I have a "Holy Bible" database, what haves 6 MB...
How this database is read-only, I think what I can store it in a XML file and load-it when necessary... But this is very slow!!!
Any sugestion?
Thank you very much for your attention
|
|
|
|
|
If it's read only, load it into a global application DataSet in the web application startup, that way it'll be around across multiple sessions without the hit from loading a 6MB XML file every time you need to access the "database." You only load it once, when the application starts...
protected void Application_Start(Object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds.Load(Server.MapPath("./db.xml"));
Application.Contents.Add("db") = ds;
}
To get it back, say to load up in a method in aspx code-behind page:
DataSet ds = (DataSet)Application.Contents["db"];
|
|
|
|