Is it possible to format XML code in scintilla in the same way that Visual Studio does when you paste some xml into a xml file.
At the moment, the xml that I retrieve is on one line and therefore hard to work with, it would be great if the xml could be formatted properly on load.
Any suggestions?
You could use NotePad++ or http://xmltoolbox.appspot.com/
One way to do this is to get .NET to do interpret the XML and export it as a formatted string, using XMLTextWriter - see this question. This assumes you're using Scintilla inside .NET though - you'd have to use the XML features of your platform of choice if not.
Related
I have xml which is processed by JDOM library. One part of xml is:
<fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format">Mytitle</fo:inline>
In output pdf 'Mytitle' is instead shown as 'MYTITLE'.
It's a legacy code and I don't have much idea of it.
So what can be the reason for this change?
I'm pretty sure it's not JDOM that is causing this. An XSL_FO processor (maybe this) is transforming the XML document to PDF.
I was wondering how can i save the result from a matlab function and use it in VB.net (if not possible then save the result in a .txt file and then use it in VB.net). thanks in advance.
MATLAB can be linked by many software such HSPICE, ANSYS , ...
There are special toolbox for these software , But I do not know ant toolbox for VB.
A simple solution is the save your result in text file.
Text file can be read in any programming language.
A important note in saving, pay attention to encoding. Source and Destination encoding must be same.
So I want to create my own programming language in vb.net 2013 and I see SyntaxEditor by actipro software fits, but how do I write xml definition file that tells which words how to be colored? is there a tutorial somewhere?
Also, how do I make the syntax editor to display the number of the line?
SCREENSHOOT OF MY PROGRAM
Showing the line number is just a property of the SyntaxEditor-control: in WPF-version it is "IsLineNumberMarginVisible". you have to set it to "true". I assume the property in WinForms-version has the same name.
when you install Actipro then there are a lot of samples included. Just look for files named *.langdef and you will find a lot of files where you can see how they shall look like.
There is also a tool "LanguageDesigner.exe" delivered with SyntaxEditor. It gives you a nice UI to create and edit the language file.
Generally I recommend to take a look at the sample projects, specially the SampleBrowser-Project with the "GettingStarted01" to "GettingStarted15" controls.
I have to port an old VB6 program to VB.NET and stumbled across an old ".res" (Resource) file, which is stored in binary format. Using VS 2013, I can embed that file into my .NET project, and VS shows me that it contains simply a string table.
The problem is, I cannnot figure out how to bring those res file into a more modern text format, or how to load the strings directly from the res file. I linked file to my application es an embedded resource, but all my atttempts to use VB6.LoadResString from the "Visual Basic Compatibility library" lead to an exception, showing the key was not found.
Furthermore, it seems VS does not allow me to copy/paste the string table into a text file, at least, not at a whole. Actually, it allows me to copy/paste one string after another, but as you can imagine, that is extremely cumbersome and error-prone. That is why I am looking for a better solution. Any ideas?
There is a functional VB6 Class for doing this at:
ResDecomp Class Decompiles RES Files
Sample programs are included, one of them a sort of "viewer" and the other just extracts RT_STRING resource strings to an XML document. You could easily change the latter to dump the string values to a text file, database, etc. instead.
Embed the .res file to a simple VB6 program which loops from min to the max ID and write out the strings to a text file using LoadResString (error trap for missing IDs).
Is there a utility out there that will create VB.NET classes from a Dataset.xsd file? And I don't mean like the XSD.exe utility does - all that does is convert the XML of an XSD file into classes in a .vb - it doesn't append any "extended" functionality.
I'm basically looking for something that will generate the beginnings of a business layer from the XSD file. Like creating a partial class for each datatable, then create a property for each of the datatable's columns as the right datatype and finally the basically CRUD methods as well.
This is something I have to do manually over and over again for each project. (I do lots of little projects and use VistaDB so I can't use Linq-To-SQL - wish I could)
I think that xsd.exe will do what you need it to. Here's and example to convert purchaseorder.xsd to a vb class in the Purchasing namespace:
xsd.exe -c -l:vb -n:Purchasing purchaseorder.xsd
Type xsd.exe /? from a visual studio command prompt to get all of the options.
You can find more info here.
Try taking a look at T4 and Code Generation tools in Visual Studio. It's like "writing code that writes code", and it's incredibly powerful.
A great video, really an "aha experience" for me
http://www.pnpguidance.net/Screencast/T4TemplatesVisualStudioCodeGenerationScreencast.aspx
MSDN:
http://msdn.microsoft.com/en-us/library/bb126445.aspx
Rob Conery has written an intro:
http://blog.wekeroad.com/blog/make-visual-studio-generate-your-repository/
... and so did Scott Hanselman:
http://www.hanselman.com/blog/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx
I understand it's probably not exactly what you're hoping for, but when you want more flexibility and NOT having to write the same code over and over again, it really sounds like T4 could be a solution.
You'll write a template, that analyses your XSD file and generates the vb files directly in your project.
I know this doesn't strictly answer the question, but it looks like VistaDB either does, or will soon, have a provider that can be used with Linq to Entities - see here
Liquid studio XML Data Binder looks like it does what you want and has a 30 day trial you can download.