Wednesday, September 19, 2007

XML

What is XML Whitespace?

XML considers four characters to be whitespace: the carriage return (\r or ch(13)), the linefeed (\n or ch(10)), the tab(\t), and the spacebar (' '). In XML documents, there are two types of whitespace:

  • Significant whitespace is part of the document content and should be preserved.
  • Insignificant whitespace is used when editing XML documents for readability. These whitespaces are typically not intended for inclusion in the delivery of the document.

Usually without DTD or XML schema definition, all whitespaces are significant whitespaces and should be preserved. However, with DTD or XML schema definitions, only the whitespaces in the content are significant as follows:


------------------
John Smith
Product Manager
Example.com
--------------------

What is XML Whitespace?

XML considers four characters to be whitespace: the carriage return (\r or ch(13)), the linefeed (\n or ch(10)), the tab(\t), and the spacebar (' '). In XML documents, there are two types of whitespace:

  • Significant whitespace is part of the document content and should be preserved.
  • Insignificant whitespace is used when editing XML documents for readability. These whitespaces are typically not intended for inclusion in the delivery of the document.

Usually without DTD or XML schema definition, all whitespaces are significant whitespaces and should be preserved. However, with DTD or XML schema definitions, only the whitespaces in the content are significant as follows:


------------------
John Smith
Product Manager
Example.com
--------------------


Problem : java.net.MalformedURLException: no protocol: error
DocumentBuilder documentBuilder
DocumentBuilderFactory.newInstance().newDocumentBuilder();

Document expectedDoc = documentBuilder.parse(new InputSource(actualResult)));
where actualResult is an string containing the xml

Solution : Here a String is passed to the parse method, but it expects a URI (as
the documentation says, "Parse the content of the given URI as an XML
document").

Do this instead:Document doc = documentBuilder.parse(new InputSource(new StringReader(getValidXML())));





Saturday, August 18, 2007

Virus Trouble Shooting

How to remove VirusProtectPro or VirusProtect Pro (Removal Instructions)
http://www.bleepingcomputer.com/forums/topic98219.html

Computer Troubleshooting guide

Few of the common problem that we see on computer and their solutions.
When you are making a change to windows registry most of the times it works but if it doesn't, restart your computer and then it should work.

Problem: Registry Editing Has Been Disabled By Your Administrator
Solution: Start > Run Type
REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f

Problem: Task Manager button grayed out.
Solution: Could be group policy settings. Try this:
Start > Run, Type "gpedit.msc", then go User Configuration > Administrative Templates > System > Ctrl + Alt + Del Options. Set Remove Task Manager to Disabled.

Problem: Task Manager has been disabled by your administrator
Solution 1: Click Start, Run and type this command exactly as given below:

REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 0 /f

Solution 2:
* Click Start, Run and type Regedit.exe
* Navigate to the following branch:
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies\ System
* In the right-pane, delete the value named DisableTaskMgr

Problem: Folder options is not available in the Windows Explorer Tools menu.
Solution: Click Start, choose Run and execute regedit.

Navigate to: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

Look for a value called NoFolderOptions on the right panel

Right click on the NoFolderOptions value and choose delete

Navigate to: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

Right click on NoFolderOptions on the right pane and choose Delete

Wednesday, May 2, 2007

VMWare Windows XP Ubuntu

I was trying to install ubuntu as a Guest OS on my Windows XP.
I started the installation two times and due to some reason I didn't completed it.
After that when I opened up VMWare Server Console, I was surprised to see that the option for creating a new virtual machine was not coming.
I searched on Google and I found a note somewhere that says go and restart the "VMWare Authorization Service" by running services.msc and yes the trick worked.

The second thing is I had downloaded the ISO image of ubuntu now I was not able to find out how do I use this image which is stored on my hard disk so the option is

Select "VM" -> "Settings" click on the CD-ROM drive.
Select the option to use ISO image and use the "Browse" button to locate the ISO image.

And then Start Virtual Machine, it will install the guest OS

Third thing if you have made the VM as private you won't be able to see it in the inventory.
So go to VM Settings uncheck the box for the private setting and you are done.

Monday, March 5, 2007

Setting up Network connection in Parallel Win XP

Bridged is where the VM acts independently of the host machine so it gets it's own IP from your DHCP server and means you can access all your network services as if it's a real machine on your network

Shared is where the host machine acts as a NAT server so your guest network is private with the host machine - you can't access the guest from another machine on the network OR access network services from the guest.

With both modes you CAN however access the Internet and outside world.

Advantages of bridged is that you can have your guest acting like any other machine on the network.

Advantages of shared is that if you're using a Wifi network or network that is tied to the Mac address of your host, your guest can piggy back this and use the same connection.

I would imagine that shared may be slightly slower (but marginally) due to the NAT going on although I can't prove that.

Sunday, March 4, 2007

Windows XP installation in Mac with Parallel

I have been trying hard to install Windows XP in Mac.
So I thought let me post my experience. I had Windows XP on my hard disk.

So the first thing that I did was I copied the same on a CD and tried with it, but it didn't worked. It took me a while to understand why it is not working, and then I figured out that parallel needs a bootable disc.

So I created a bootable disk with Nero, and copied the Windows XP from my hard drive.
After doing this Parallel has accepted the CD, but after running for few sec I saw A:\>,
When I saw the command prompt.. I saw the follwong
No FAT32 Volumes Found, exiting.....
No NTFS Volume found, exiting....
and then A:\>
Now once again another problem, and the problem is to figure out what went wrong and the problem was that Parallel needs a Windows XP bootable disc, not a normal bootable i.e. DOS bootable which can't recognize FAT32 or NTFS, and that's why I was getting A:\>

So the next step was to find out how to create a windows XP bootable disc, after searching a lot on google and wasting a couple of CD I found the following link, which works perfectly.
http://www.tacktech.com/display.cfm?ttid=297

Finally I was able to create a Windows XP bootable CD, and run it on MAC.