[CDATA] not the same way read in DOM and SAX (DOM: O.K., SAX: not O.K.)
I wrote a test application that reads a XML file. First method reads it via DOM in a Document object, second that reads it via SAX in a string. The output is almost the same but the character data is different:
while the dom outout is as expected:
<hap>EUSF</hap>
<name><![CDATA[WADDELL&REED ADV BOND CL Y]]></name>
the SAX output is different:
<hap>EUSF</hap>
<name>WADDELL&REED ADV BOND CL Y</name>
as both elements have text data, only the second is enclosed in a <![CDATA]> value. The DOM output is the same as when displayed the XML in internet explorer, so i guess this is the correct result. but my SAX reader does not display the <![CDATA]> value ...
to get the sax output i subclassed DefaultHandler and overwrote the methods like described in the Web Service Tutorial "Echoing an XML File with the SAX Parser" (http://java.sun.com/webservices/docs/ea2/tutorial/doc/JAXPSAX3.html#64190):
* Overwrites super.
* Receive notification of character data inside an element.
public void characters(char buf[], int offset, int len) {
String s = new String(buf, offset, len);
if (!s.trim().equals("")) { //suppress output of characters that are all whitespace
write(s);
}//characters()
the characters() method has the content of an element, but it has not the information if a CDATA is enclosing the data or not(?). How can this be done?
There's a thing called a LexicalHandler (org.xml.sax.ext.LexicalHandler) that has startCDATA and endCDATA methods. The API documentation suggests that you could create your own LexicalHandler and use it somehow, but it doesn't give you a nicely packaged example. I don't have an example of it either, sorry.
However despite what you say, those two outputs are not different. In XML terms they are identical and parsers will treat them identically.
Similar Messages
-
I upgraded my macbookpro hard drive to 1 TB then migrated my files from time machine. I'm now locked out of the computer because the password is not the same as my usual one and one that was years old and not retreivable. How do I work around this?
Whether or not you are able to recover the data off the drive yourself will depend on if the drive suffered any impact damage in the crash. You can buy USB SATA or IDE adapters (Intel and almost all G5 use SATA) that will let you connect your hard drive to a computer (like a flash drive) to see if you can recover the data. If the drive has suffered physical damage if may not mount.
If you know someone who has one of these adapters you could try using theirs, otherwise you could buy one but you take the risk of the data on the drive being non recoverable. Regardless, both are much cheaper than $1699!
(Alternatively, if you know of someone with a Mac Pro or PowerMac G5 they may be able to install the drive in their machine and try to boot from or mount it and copy the data off.) -
File appearence not the same in PS CS4, LR2 and Camera RAW
I've just noticed that files as displayed in Lightroom 2 or in Camera RAW, when opened in Photoshop CS4 have a different appearence. In Photoshop the file appears much flatter and with considerably less saturation and dynamic range. When you compare the files beside each other in RAW and in Lightroom, they look the same. I have tried exporting the files to Photoshop from Lightroom using the "open with Lightroom Edits" and Edit a Copy and Edit the original, but the results are the same. After editing a photo in Photoshop and saving it back into Lightroom, the photo appears very saturated in the Lightroom or in Camera RAW. I don't know how long this has been this way, but now that I hace noticed it, it is driving me nuts.
Thanks for your help
SteveChristopher thank you so much for responding and you have pinpointed the problem. The problem was the color settings. Color settings were set to sRGB and when I changed it to ProPhoto RGB Photoshop rendered file as it appears in the files in Lightroom and Camera RAW. I shoot in ProPhotoRGB and that seems to be why the images looked so flat when imported using sRGB.
Thanks for taking the time to help
Steve -
When I try to buy ibooks from my ipad, the virtual keyboard is not the same as my computer keyboard, and since my password consists of letters, numbers and symbols, the ipad keeps displaying "incorrect password". Is there any way around this please anybody?
katykittenoid wrote:
the virtual keyboard is not the same as my computer keyboard
Are you using the virtual keyboard to input your password and you cannot see/find the characters you need on that keyboard?
Or are you trying to use a bluetooth keyboard and pressing the printed key does not produce the right character? -
On a Mac, in Adobe Photoshop CC 2014, when adding audio to an edit, i get the message "Could not complete your request, because Dynamiclink is not available".
When performing the exact same operation in Adobe Photoshop CC, i can add audio in the same way, no error message. Any ideas to solve this, anyone? Would be greatly appreciated.I tried to update and it keeps telling me to get the Application Manager. And this is what happens
Adobe Application Manager failed and it told me to download the Adobe Support Advisor.
Adobe Support Advisor told me that there was an issue:" cpsid_82829s1: "A restart is pending," bootstrapper error has occurred. "Token Number: 40-87772-063201122012
I followed the instructions it gave me to correct this issue:
If you receive the error "Installer has detected that a machine restart is pending. It is recommended that you quit the installer, restart try again," do the following:
#Restart the computer and try the installation again.
#If the installation fails, delete the InProgress registry key:
Disclaimer: This procedure involves editing the Windows registry. Adobe doesn't provide support for editing the registry, which contains critical system and application information. Make sure to back up the registry before editing it. For more information about the registry, see Windows registry information for advanced users on the Microsoft support site, or contact Microsoft.
Launch Windows Registry Editor.
(Windows XP) Choose Start > Run, type regedit in the Open text box and click OK.
(Windows Vista/ Windows 7) Choose Start, type regedit in the Search box, and press Enter.
Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager.
Delete the InProgress key.
I was not able to find the "InProgress" key. -
I think I have it working on my iPhone 5. But, I do not see how I can control the exit point that I would like for the VPN. Are all the exit points shown in the VPN setting now going to work with Open VPN, or do they remain PPTP? If I am reading correctly, they look like they remain PPTP. If I cannot control the exit point for open VPN, which exit point is the default in the profile you provided me?I note that Open VPN Connect does not work with any of the new 64 bit devices like the iPhone 5S, the iPad Air, and the new iPad MIni. Is there any chance that you guys will come up with an update for your app so that open VPN can be made to work on all iOS devices? That would be nice, particularly if the Open VPN Connect app does not give me a choice of exit points.Thanks,
I do not see where to enter IP addresses in the Open VPN setup. Also, how can I set it up so that I can choose different servers in the same way as I can currently choose them with my VPN app but for PPTP?
Just a quick note to tell you that Open VPN has updated their app so that it is compatible with 64 bit ARM devices like the iPhone 5S, the iPad Air, and the iPad Mini Retina.That does not resolve the problem of how to easily choose among the various possibilities for the exit server. We need to find an easy way to choose.Thank you for trying the new Firefox. I'm sorry that you’re unhappy with the new design.
I understand your frustration and surprise at the removal of these features but I can't undo these changes. I'm just a support volunteer and I do not work for Mozilla. But you can send any feedback about these changes to http://input.mozilla.org/feedback. Firefox developers collect data submitted through there then present it at the weekly Firefox meeting
I recommend you try to adjust to 29 and see if you can't make it work for you before you downgrade to a less secure and soon outdated version of Firefox.
Here are a few suggestions for restoring the old design. I hope you’ll find one that works for you:
*Use the [https://addons.mozilla.org/en-US/firefox/addon/classicthemerestorer/ Classic Theme Restorer] to bring back the old design. Learn more here: [[How to make the new Firefox look like the old Firefox]]
*Use the [https://addons.mozilla.org/en-US/firefox/addon/the-addon-bar/ Add-on Bar Restored] to bring back the add-on bar. Learn more here: [[What happened to the Add-on Bar?]] -
FaceTime: I have a iPad, iPhone, iMac all on the same apple Id/account. Without changing id/email address can I use FaceTime between any 2 of my devices? It works from iPad to iPhone but not the other way??? I would like talk/see my kids if am away.
Hope you can help.
I have added a new email address but kept my Id, but I get busy when trying from iPhone to iPad as they are clashing. Like find my iPhone app hence trying to keep them all on one accountIOS: using facetime http://support.apple.com/kb/ht4319
using an ipad will use the email address since you can't make a phone call. see the link.
Your basically calling/emailing yourself that's why your getting a busy signal. -
I'd copied some pictures from a PC to a folder in Finder in my new iMac. The 'Date Created' in iMac is not the same as the 'Date Created' in the PC. Why? Is there a way to fix that?
View Menu -> Sort Photos is a good way to start.
Some organising possibilities in iPhoto:
I use Events simply as big buckets of Photos: Spring 08, July - Nov 06 are typical Events in my Library. I use keywords and Smart Albums extensively. I title the pics broadly.
I keyword on a
Who
What
Where basis (The When is in the photos's Exif metadata). I also rate the pics on a 1 - 5 star basis.
Using this system I can find pretty much find any pic in my 50k library in a couple of seconds.
So, for example, I have a batch of pics titled 'Seattle 08' and a typical keywording might include: John, Anne, Landscape, mountain, trees, snow. With a rating included it's so very easy to find the best pics we took at Mount Rainier.
File -> New Smart Album
set it to 'All"
title contains Seattle
keyword is mountain
keyword is snow
rating is 5 stars
Or, want a chronological album of John from birth to today?
New Smart Album
Keyword is John
Set the View options to Sort By Date Ascending
Want only the best pics?
add Rating is greater than 4 stars
The best thing about this system is that it's dynamic. If I add 50 more pics of John to the Library tomorrow, as I keyword and rate them they are added to the Smart Album.
In the end, organisation is about finding the pics. The point is to make locating that pic or batch of pics findable fast. This system works for me. -
I would like my music to appear organized in the same way on my iPad as I have done it on my Mac Book. (and on my iPhone as well) Since it is in the cloud, why does it not appear the same way in all devices?
The purpose of iTunes match is to make your music library available to all of your devices anywhere. It will sync Playlists, but no other type of organization you may have made.
If you're having trouble, be sure you are logged into the same Apple ID on all devices but be sure to read this article and pay special attention to associating your devices with an Apple ID. There are important restrictions you should know about. -
In Keynote09, if i set custom presenter display settings (large presenter notes), and i save the file, will i see my notes in the same way on another computer?
Are the presenter display setting saved in the file?
Thanks for your help!it wont.
Presenter note display is set per machine.
Surprising nobody in this community knew this. -
Why are lyrics not viewable in itunes in the same way as on the ipod?
Why are lyrics not viewable in itunes in the same way as on the ipod? In itunes all you get is "Get Info" then "Lyrics" and that screen then locks itunes until you close it. Inflexible, annoying and surely unnecessary?
All songs need Album, Artist and title.
Also, look under Artist -> Compilations. -
I have an iMac OS X Version 10.5.8 but I also have a MacBookPro 10.7.5 version, why software updates are not the same? For example, the way to see how much memory I have in my iMac is diferent than MacBookPro. And where I can see the memory of the disc I've got in my iMac? Than you very much.
If you want everything the same on both computers you need to be running the same OS X version. You can't because your iMac is a PPC machine, not Intel.
But to see information about your hard drive is the same for both. Simply select the drive icon on the Desktop. Press COMMAND-I to open the Get Info window. Disk information is in the upper panel. -
Write a SELECT statement in different ways is not the same thing!!!
Let's take a look
use AdventureWorks2012
go
dbcc freeproccache
go
and now select something
select * from [HumanResources].[vEmployeeDepartmentHistory]
go
so, analyzing 'Compiled Plan'
SELECT usecounts, cacheobjtype, objtype, text
FROM Sys.dm_exec_cached_plans
CROSS APPLY sys.dm_exec_sql_text(plan_handle)
where cacheobjtype = 'Compiled Plan'
ORDER BY usecounts DESC;
GO
and now let's write some SELECT in "fuzzy case"
dbcc freeproccache
go
select * from [HUMANResources].[vEmployeeDepartmentHistory]
go
select * from [HumanRESOURCES].[vEmployeeDepartmentHistory]
go
select * from [HumanResources].[VEmployeeDepartmentHistory]
go
select * from [HumanResources].[vEmployeeDEPARTMENTHistory]
go
select * from [HumanResources].[vEmployeeDepartmentHISTORY]
go
SELECT * from [HumanResources].[vEmployeeDepartmentHistory]
go
select * FROM [HumanResources].[vEmployeeDepartmentHistory]
go
and now let's see compiled plans again
SELECT usecounts, cacheobjtype, objtype, text
FROM Sys.dm_exec_cached_plans
CROSS APPLY sys.dm_exec_sql_text(plan_handle)
where cacheobjtype = 'Compiled Plan'
ORDER BY usecounts DESC;
GO
So, write a SELECT statement in different ways is not the same thing!!!
Hope it'll be useful
P.CeglieYes. There is little or no query normalization that happens in front of the query plan cache. It would be a performance tradeoff to parse and normalize the query before matching it to the cached plans. The benefit of reducing the number
of plans in the cache probably wouldn't be worth it.
David
David http://blogs.msdn.com/b/dbrowne/ -
Before you crucify me please read the problem I've outlined below, because it's not the same issue other people are having. I did research the forums for the particular issue I'm having and it's not the same as what's already been posted. Please let me explain.
Here is my machine info.
iMac running Mac OS X Lion 10.7.5 on 2.5 GHZ Intel core.
Safari Version 5.1.7
I run two instances of Safari. I will have 1 safari browser window open on the left side of my screen with 7 tabs all on pages that require login. I run a second instance of Safari on the right side of my screen with only one tab open logged into 1 web page.
Here's what happens. Ocassionaly when switching the focus from one browser to the other all of my logged in web pages will refresh and I'll be logged out of all my logged in web pages, on both open browsers. There's never a certain amount of time that this happens, I've had it happen 3-4 hours into my work day and I've had it happen 10 minutes into my work day. I've also had this occure when I'm putting the focus from one browser window to the other and then I go to resize the width of the window I just put the focus on.
I'm thinking that there must be some setting or short cut "gesture" built into Safari that I'm triggering to make this happen, however I have looked at all the settings and can't seem to find anything that would cause this.
Any help or advice is apprecaited.BDAqua - I have two Safari windows open - I guess in my semi technical mind that equated to two instances. But your probably right, just one instance of app with two windows open.
About two minutes after I posted my question, I was doing some work in one of my tabbed web pages, as I pressed the submit button to update the record on that page and as the page was refreshing I clicked my mouse on the second open Safari window to put the focus on that window, as soon as I put the focus on the second open browser I got logged out of all my logged in tabs in both windows.
The time it happened was sometime between 14:30 and 14:35
I'm looking at the Sytem Log. IN the filter I typed Safari and nothing came up from today in the log.
Just looking at "All Messages" between the hours of 1430 and 1435 their are no messages about safari, just the following.
1/10/13 2:32:22.000 PM kernel: IOSurface: buffer allocation size is zero
1/10/13 2:32:25.000 PM kernel: IOSurface: buffer allocation size is zero
1/10/13 2:32:25.000 PM kernel: IOSurface: buffer allocation size is zero -
I meet a lot of 3G signal when a call signal disappears 3G! I read the manuals and anything I find the problem! I do so with other brands and other cell does not, the same goes when I receive a call!
Who is your carrier? Are you actually on 3G?
Do you have 3G turned on or off? Settings > General > Network > Enable 3G
Maybe you are looking for
-
Printing pdf/postscript with JPS 1.4 -- HELP!
Hi all, I've been experimenting with the new java printing service and I have run into a couple problems. In particular, I have been trying to get even the most basic example referring to printing a postscript file directly to a printer. The code is
-
I have old video clips in Photoshop Elements Organizer v12 for Mac. I want to divide some of those single clips into 2 or 3 separate clips, each shown separately in Organizer. I can divide the clips in Premiere Elements Editor 12 and save them as "
-
What is Functional area concept in SAP, What way it is useful.
Any body explain the concept of Functional area, in which way it is useful . give 2/3 examples how to use.
-
Webdynpro Theme Specific Application
Hi All, Is there any way by which we can change the look of webdynpro applications.We need to implement themes specific look in the webdynpro application. Pls help Rakesh
-
Hi guys, In need to load contents of tables (T558B, T558C, T558D, T558E, T5K8C, T5K8D, T5K8E, T5U8C, T5U8A) . Could you please tell me which method is the SAP recommended way for the loading? Thanks a lot, Franck