Replace Content B4 Parsing

Hi All,
I hav an xml coming out of an input stream whose encoding is 'UTF-8'.
I have to change it to "ISO-8859-1" and then parse the xml. I was trying to replace the string, but cud not do it. can anyone help me with the code that can replace that particular string from an xml coming out of an input stream. Any help wud b appreciated.
Thnx in adv
Anil.

I have to change it to "ISO-8859-1" and then parse the xml.Why? Or more exactly, what do you mean by that?

Similar Messages

  • Smart Objects: How can I prevent resizing when replacing contents?

    There seem to be 2 kinds of smart objects:
    One kind where you can replace the contents, no matter what size it has and it will fit into the bounding box of the smart object which is already there.
    The other kind where this doesn't happen.
    Is there any way to control that behaviour? I found that in older PS-files, replacing contents always made the new content fit into the bounding box, but since CS3, the transformation stays the same which means I have to rescale the smart-object if the content-size has changed.
    Example:
    Imagine a game cover with screenshots on the back side. Now each screenshot is a smartobject.
    All Screenshots are at 640x480 (assumend the standard screen dpi of 72)
    Now I found them in a better resolution (1024x768, also 72dpi) and replace the old ones with "replace content".
    The old photoshop behaviour: Photoshop would fit the larger image to occupy exactly the same area than it's predecessor.
    The new behaviour: The whole Smartobject is enlarged by 160% (not the transformation parameters, the visual appearance.), I have to scale it down to make it fit to the old size.
    And I really wonder about having older and newer Photoshop-Files where these Smartobjects behave differently.
    Now did I miss something in the help section or is there a way to control this behaviour?

    Yes, fortunately, I am a Windows user, but I don't want to start a religious war here And it is also possible to run multiple versions of Adobe products simultaneously under Windows - why shouldn't that be possible? Currently I have CS3 and CS4 and somtimes use CS3 when CS4 is just too buggy to get the job done. Before that I had CS and CS2 on the same machine.
    But I wouldn't keep all versions back to PS 6.0 or CS, that would be a bit too chaotic and I'd had to spend days of installing if I get a new computer. I expect those programs to be a little bit backwards-compatible, so I don't have to use many different versions. And for Photoshop, this is mostly the case. It's just very tiny details like Smart Object resizing that seems to work differently.
    Otherwise I'm really happy that in CS4 I can finally link Masks to smart objects and apply warp and perspective on them, that's a big plus!

  • Replace content of multiple Smart Objects

    Here's simplified version of my dilemma: (Photoshop CS5.1)
    A file contains 3 instances each of 2 unique Smart Objects. Is it possible to Replace Contents of all 6 objects so that they share a common source content?
    Seems simple. Doesn't work.

    The only other thing I can suggest is to post in the Photoshop Scripting forum to see if the scripting wizards there have a script to solve your issue. 
    (I couldn't script my way out of a paper bag myself.)
    http://forums.adobe.com/community/photoshop/photoshop_scripting

  • HELP I have lost all my motion 4 content from all the files, ive looked in all the files and they are all empty. can i get replacement content as I my dvds where stolen along. with my other laptop.

    HELP I have lost all my motion 4 content from all the files, ive looked in all the files and they are all empty. can i get replacement content as I my dvds where stolen along. with my other laptop. any Ideas. would be a great help. For Motion 4.

    Try a hard reset:- hold the home button AND the power switch - ignore the red "Slide to power off" and wait ubntil the iPhone powers down, and then restarts - at the Apple logo, release all the buttons and see if your contacts reappear.

  • Action for Replacing Contents of a Smart Object

    I am using CS5/PS to create a collage created of several images (smart object layers) that I have positioned using individual clipping masks.
    I would like to be able to replace the contents of the images, which I can do via Layer>Smart Objects>Replace Contents...,   but I'd like to have an action for a "one-click" process instead of three clicks.  Problem is, when I try to record the action, it requires me to complete the replacement, and then the action gets hard-wired to replace the image used in the action "record", and therefore doesn't allow me to select which image I'd like to use.
    This functionality is available in PS Elements, so I believe it can be done.  I'm sure I'm missing something pretty basic, I just don't know what!!
    Thanks in advance,
      Brian

    »The separate Photoshop Windows and Macintosh forums will become Read Only on Tuesday, January 3rd.«
    Have you checked the »Toggle dialog on/off«-checkbox beside the item in the Actions Panel?

  • How to replace content in text data type?

    How to replace content in text data type? 
    when we sending the mails we are taking content from the database.
    The data is maintained in text data type column. Now i have to replace some of content in mail content
    (text data type column) from database. 
    I tried by using REPLACE function but data is truncated

    The data is maintained in text data type column.
    Hello,
    See REPLACE (Transact-SQL) => "If
    string_expression is not of type varchar(max) or
    nvarchar(max), REPLACE
    truncates the return value at 8,000 Bytes"
    You may should consider to Change the data type from "Text" (deprecated) to NVarChar(max).
    Otherwise you have to use
    UPDATETEXT (Transact-SQL) for the text data type.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Replace content smart objects doesnt work properly.

    Hello fellow Photoshoppers,
    Currently i am working on reusable album templates with smart objects. At first i was very enthusiastic but this was soon to end. as the replacing doesnt work properly.
    I made the smart object by using:
    1. > file
    2. > place
    then i try to replace the content by using.
    1. > layer
    2. > smart objects
    3. > replace contents
    the old image should get replaced by the chosen file and matching size, smart layers etc. However when i perform the same actions my image gets replaced but it is not the same size as the smart object it replaced. This makes the entire template useless as it would take far too much time resizing every single image. inspired by another video I also tried double clicking the layer and tried replacing the image in the editing sceen by dragging another file on top of the smart object. Again, it does not spread out to the full smart object size and i'm stuck with a small image in need of extra work.
    Needless to say, very frustrating.
    Any thoughts?

    Are you sure you understood how it is intended work?
    That is an interesting question, i have no experience with photoshop as i bought CS5,5 just a week ago and have no experience with any of the previous versions either. All info regarding how to make such a template i found from various tutorials, i posted one below. When they do it the image get scaled perfectly. Now since they use some smart filters in the tutorial i applied them aswell to see if this would fix the problem but it did not.
    http://www.picturesocial.com/video/wedding-photo-album-templates
    Are the images you want to switch in at least always of the same width to height-relation?
    I checked both files for consistency and discovered they were shot on different camera's. One file ( the origional smart object ) was cropped form a 21,0MP file and the other was croped from a 10,1 MP file. Both images were cropped to a 2x1 ratio. Having discovered the difference in pixel amount i cropped a different 21,0 MP file to 2x1 ratio and checked both files for their exact dimensions (both images are equal in size with 5616 x 2808 pixels) and replaced the content with the newly cropped file which gave a much better result. However, the image was slightly smaller in photoshop leaving a small gap where the origionally placed smart object lined up perfectly. I turned the situation around and placed the 10,1MP cropped image as the smart object and replaced the content by a 21,0 MP cropped image. As to be expected i ended up with a new image much larger then the smart object. So the smart object does not constrain the files to the dimensions set. As it turns out it only scales the replaced content relative to the size of the origional content of the smart object.
    I just need a reusable template with objects that:
    - cannot be moved once locked ( if possible) but can have its content replaced
    - scales the replaced content to the predefined dimensions
    - needs no prework like cropping to the same aspect ratio as the smart object content. ( i want to be able to place a landscape sized raw (3x2) on any landscape format  (2x1 / 16x9 / 4x3 or whatever) i find it acceptable to having to crop a portret to landscape orientation first before being able to replace a landscape.
    now ive been searching for more info and some people say indesign is much faster in making album pages so I am installing the program as we speak hoping this will be the solution.

  • Best way to replace contents of a layer with higher res image

    I can do it, but I was wondering if there is a better way.
    Large PS file (CS6 and CC) half a dozen texture layers using low res images. Several have blend modes, transparency and even masks. I now have the same images in high res. I want to replace just the image, but not lose my blend/transparency, or masks.
    Any thoughts?
    Do I bring in the high res layer, copy the mask over etc? Then delete the original?
    Max

    Try this.
    Convert the low res images to Smart Objects. Layer > Smart Objects > Convert to Smart Object.
    The replace the contenst of the smart objects. Layer > Smart Objects > Replace Contents...
    This way you can replace the low res images with the hi res versions. Provided they are the same crop and aspect rarion your mask should be fairly good to go. I say fairly good as you may have made some adjustments (eg. feathering) based on the resolution.
    The blend modes and transparency will be unaffected.

  • DTD Content Model Parse Tree

    Is there any documentation available that explains the Content Model Parse Tree for any simple DTD ? I am having trouble to understand the mnemonics (*, + etc.) while traversing a root node.

    Hi.
    You are saying that there are methods
    in the XDK for C that can access a parsed
    DTD structure and get information about
    ELEMENT tags in it. I haven't found any.
    Can you please tell me what these methods
    are? I need to get the ELEMENT information
    but all I can get are NOTATION and ENTITY
    tags.
    I would appriciate your help.
    Thank you,
    A. Volnov
    null

  • Setting content (Java parser)

    Hi, I'm using a Java parser to take in binary files.
    In windows explorer if I drag and drop on to an ifs
    it works fine, however if the file already exists
    then it is replaced by a 0 byte file of the same name.
    Heres the relevant parser code:
    public LibraryObject parse(InputStream inStream, ParserCallback callback, Hashtable options)
    dis = new DataInputStream(inStream);
    baos = new ByteArrayOutputStream();
    int b = -99;
    byte[] buffer = new byte[1024];
    try
    while((b = dis.read(buffer)) != -1)
    if(b < buffer.length)
    baos.write(buffer, 0, b);
    else
    baos.write(buffer);
    catch(EOFException e)
    DocumentDefinition docDef = new DocumentDefinition (m_librarySession);
    Collection allFormats = m_librarySession.getFormatExtensionCollection();
    docDef.setFormat((Format) allFormats.getItems("bin"));
    docDef.setClassname("BINARYFILE");
    docDef.setAttribute("NAME", AttributeValue.newAttributeValue(options.get(CURRENT_NAME_OPTION)));
    byte[] outbytes = baos.toByteArray();
    bais = new ByteArrayInputStream(outbytes);
    docDef.setContentStream(bais);
    Document newDoc = (Document)
    m_librarySession.createPublicObject(docDef);
    if(options.get(UPDATE_OBJECT_OPTION) != null)
    Document currentDoc = (Document) currentFolder.findPublicObjectByPath
    (docDef.getAttribute("NAME").toString());
    currentDoc.update(docDef);
    else
    currentFolder.addItem(newDoc);
    baos.close();
    //bais.close();
    //dis.close();
    As I said this only causes trouble if the file is already present in the ifs directory I'm placing it in.
    Thanks for your time,
    Cathal

    try moving this line:
    m_librarySession.createPublicObject(docDef);
    into the "else" block of your condition:
    else
    // move the line here
    currentFolder.addItem(newDoc);
    the mistake you're making is that you always create a new document, whether or not you want to update an existing document or not.
    this mistake causes two problems:
    1. when you're updating (i.e. the "if" block of your condition will execute) you leave the new document you created floating around.
    2. when you're updating, the existing document content gets set to 0 bytes. why? because you already sucked out all the bytes from your bais when you created the new document earlier! when you try to update the existing one later, the bais is already "at the end" and there's nothing left to read out. for more info about this you should read up on the java.io package.

  • CMSDK: How to replace the deprecated Parser

    Since 9.0.3 custom parsers are deprecated. Custom parsers where the ideal mechanism to ensure consistency in document-handling functions throughout the different protocols, while providing the possibility to act upon an upload operation before any decisions where made about how to store the document.
    You could, for instance, decide to store the document as an instance of a specific subclass of document. This decision would be unrelated to the specific protocol the user chose to use to perform his upload, and thus it was possible to maintain consistent logic across the different protocols.
    The 9.0.3 developer reference, chapter 12, suggests that you actually don't need these parsers, that they are overly complex and that you can simply implement your parser in a http-servlet (implying that you shouldn't use ftp, smb, ... for uploads). To stress their point (I guess) they removed (silently) the possibility for custom parsing from all but the cup protocols.
    I thoroughly disagree with this and would like to maintain the functionality provided to us by the 9.0.2 parser - if necessary with different techniques. Two existing customers are unable to upgrade to newer versions simply because of this problem.
    I have taken the possibility of an agent into account, but that lacks the possibility to interactively inform a user about problems regarding the content of his uploaded file. Furthermore, changing the cmsdk-class of an allready created object is tedious.
    Anybody from Oracle with an explanation about the deprecation of the parsers?
    Has anybody faced the same problems? Did you survive?
    Happy to hear your thoughts,
    Bart

    I figured out the order in which things get stored in iFS, when creating a new Document:
    1. S_TieDocument.extendedPreInsert
    2. S_TieContentObject.extendedPreInsert
    3. S_TieDocument.extendedPostInsert
    4. S_TieFolderRelationship.extendedPreInsert
    5. S_TieFolderRelationship.extendedPostInsert
    6. S_TieContentObject.extendedPostInsert
    After the post-insert calls, things are stored in the database. If I would want to determine the type of a document based on its contents or the folder it will be stored in, then this information should be available in step 1. Before the document is stored in the database, we have to change the class id, or the document will be stored in the wrong tables.
    But in step 1, the S_TieContentObject has not been created and there is no relation between the document content and the document itself. The same goes for the folder relationship. So I don't think changing the document type (class id) in a server-side override is going to work.
    Does anybody at Oracle has ever tried any of this?

  • Apple script to replace content in specific folders with folder names in csv

    Can anyone please help me with this scenario... It would greatly be appreciated!
    1. I have a list in csv containing 3 columns: Column 1 = Folder name • Column 2 = Entry A • Column 3 = Entry B
    2. I have 100 folders named the same as Column 1.  in each folder there is different files.
    This is what I need.
    I need the script to to find the folder based upon column 1.
    Then the script should search for place holder named "Entry A" and replace it's contents with data from Column 2.  There are several files with in the folder that contain place holder "Entry A" so it should replace it all but must remain with in that folder.
    Then same for column 3 find place holder named Entry B and replace.
    Then it should save all files.
    Any help is greatly appreciated!  Thank you!

    Can anyone please help me with this scenario... It would greatly be appreciated!
    1. I have a list in csv containing 3 columns: Column 1 = Folder name • Column 2 = Entry A • Column 3 = Entry B
    2. I have 100 folders named the same as Column 1.  in each folder there is different files.
    This is what I need.
    I need the script to to find the folder based upon column 1.
    Then the script should search for place holder named "Entry A" and replace it's contents with data from Column 2.  There are several files with in the folder that contain place holder "Entry A" so it should replace it all but must remain with in that folder.
    Then same for column 3 find place holder named Entry B and replace.
    Then it should save all files.
    Any help is greatly appreciated!  Thank you!

  • Incoming email replaces content with contents from old email already in inb

    This morning for no apparent reason, incoming email has its content replaced with the entire content from seemingly random emails received months ago. It also replies the sender email to that attached to the old content.
    What could be happening here?

    Hello, and welcome to the Discussions.
    This is an indexing problem. Are you using any plugins or add on software for Mail? Any anti-virus or internet software, or backup software that is not Apple?
    If only noticed in the Inbox, then open the Inbox (for one account only, if more than one account is setup), click on Mailbox in the Menubar, and choose Rebuild. Rebuild repairs the universal index that Mail uses, but be aware that at one point in its operation, all message will disappear from the list of messages before all reappear. It can take several minutes if there are lots of messages.
    Is this account POP or IMAP, btw? I ask this because you should not use the method Mulder recommended if using an IMAP account, without additional steps.
    Ernie
    Message was edited by: Ernie Stamper

  • Replace content on used iPod with mine?

    My iPod touch 2G recently died and I got my sister's old iPod, also a 2G. How do I go about wiping it and replacing her content with mine? Do I "erase all settings and content", then sync to my iTunes like normal?  If I just sync like normal, will ALL of my data from my old iPod still be there, or just program-inherent data? Can I/should I replace with backup data?
    Thanks!
    AR

    Connect her iPod to your computer and restore her iPod from the backup of our iPod.
    See:
    iTunes: Backing up, updating, and restoring iOS software

  • Replace content in CFHTTP content

    We are using CFHTTP to grab some content from a sister site
    of ours. When displaying the cfhttp.FileContent we want to remove
    certain elements from the page. The problem is the elements to
    remove are often large chunks of code as opposed to just a word
    here and there. I tried doing a cfsavecontent variable and replace
    the cfhttp.FileContent stream with the cfsavecontent variable but
    it doesn't want to work. Is there an easier way to do this? Like
    specify a starting point of the chunck of code to remove and an end
    point and removing everything from the start to the end point from
    the cfhttp stream?
    THANKS

    thanks guys, ok so here is the URL I am usng in the CFHTTP:
    http://www.truckpaper.com/listings/forsale/list.asp?pcid=391030&etid=1&bcatid=27&dlr=1
    I would liek it to ONLY return the search results table. So I
    need to remove the header information at the top and the search
    form and everything else at the bottom. So the first thing you will
    see is the beige table row with the column headers and the last
    thing you will see is the links to go to the next two pages.
    The blocks you wish to replace contain arbitrary spaces,
    perhaps even dynamic elements. I don't think it is advisable to use
    the cfsavecontent tag. In string search and replacement, every
    character counts. It is surgery by laser.
    What you need here is an axe. For example, if you chop off
    the contents of the first form and the last two forms, you will get
    a result close to what you seek.

Maybe you are looking for