Revising mixed content with dom4j

Hi,
I have a tagging structure of mixed content like this:
<old-element/>[<it>here is some text</it>] and I want to change it to
<new-element>[<it>here is some text</it>]</new-element>I'm using for dom4j, and I'm selecting the nodes like
List nodes = doc.selectNodes("//old-element")then looping through each node, I pick up the brackets as a following text node, then the <it> as a following node.
just wondering if anyone else had a good solution to this problem.
thanks,
bp

Successful OCR depends upon the quality of the scan. A nice 300 dpi tiff file has a good chance of being OCRd by any half-decent OCR program. Acrobat when it imports a 300 dpi tiff will be able to OCR if the quality is good. Take the same tiff file and convert it to a jpg and all bets are off. jpf is a lossy format. It is designed for photographs not line graphics or text. Upon conversion to jpg many of the edges of the lines/boundaries of the letters will be come fuzzy. It is the boundaries of the characters an OCR program uses to figure out the which letter is which. Hence, the jpg will not easily be OCRd. Its not impossible, but it is a much harder job.

Similar Messages

  • OCR of mixed content with Acrobat Pro 9

    Hi,
    I've heard that it should be possible to perform OCR on documents consisting of mixed content by the use of Acrobat Pro 9. By mixed content I mean e.g. a header made up from text, and a body which is a scanned document (e.g. a jpeg file). In Acrobat Pro 8 I tried to carry out this process, but Adobe just returned an error message. Thus, I decided to upgrade to Acrobat Pro 9. But this did not solve the problem. The same error message appear, and the body of the document is therefore not OCR'ed.
    The error message is the following: "Acrobat could not perform optical character recognition on this page because: " .. 
    Have anybody tried to OCR mixed content and found a solution to this problem/challenge?
    Best regards,
    Andreas

    Successful OCR depends upon the quality of the scan. A nice 300 dpi tiff file has a good chance of being OCRd by any half-decent OCR program. Acrobat when it imports a 300 dpi tiff will be able to OCR if the quality is good. Take the same tiff file and convert it to a jpg and all bets are off. jpf is a lossy format. It is designed for photographs not line graphics or text. Upon conversion to jpg many of the edges of the lines/boundaries of the letters will be come fuzzy. It is the boundaries of the characters an OCR program uses to figure out the which letter is which. Hence, the jpg will not easily be OCRd. Its not impossible, but it is a much harder job.

  • Set mixed content false or handle it

    Hi guys, I´m having some troubles with a 3rd party webservice, the webservice is suposed to return items for the same type, some like this :
    this is awfaul, because i need to parse the string to XML and maybe the complete response can´t be set in a string variable because the length, i need it parsed in items like the first approach but without a mixed set to "true", I´m not a .NET expert but if someone can help me about this, how to handle mixed content in SAP or even better how to return items in .NET without using mixed content, with that i will explaint how they can achieve this.

    The issue is that the code in VB is creating the XML manually returning a XmlDocument.

  • Working with mixed-content XML

    Am new to Flex 2 and AS 3 but well versed in XML and related
    technologies. This is my first time posting to the forum.
    I have a simple Flex application that loads an external XML
    file via HTTPService and binds the XML to some MXML form controls.
    This works well as long as the XML element contains simple text,
    but breaks when the element contains a mixture of text and other
    elements (e.g. mixed-content).
    <something>some text</something> (Fine)
    <something>some <b>bold</b>
    text</something> (Breaks).
    Just wondering if anyone has could point me to an example of
    a Flex application interpreting mixed content XML. I've looked at
    various forums and in books and there isn't a lot on the subject
    from what I can see. Most of the XML examples I've found use flat,
    database/table-style XML which don't suit my purposes.
    Thanks
    Heather

    Let's not give up here. The problem is that you have HTML
    inside of an XML structure and the HTML, because its syntax is just
    like XML, cannot be distinguished by the XML parser. The proper way
    to get your HTML embedded in the XML is to use CDATA. So whoever
    created the XML didn't take that into account.
    I gave this a bit more thought. This will work ONLY if the
    HTML inside of the XML is always complete. No <br> tags
    without a </br>; no <p> without </p> etc. as that
    won't be readable by the XML parser.
    Once you've got your XML structure in Flex, you can get all
    of the <something> items like this:
    var somethings:XMLList = xmlvar.something;
    Now you have an XMLList - an Array of XML structures. This
    means somethings[0] is "some text" but somethings[1] is an XML node
    with a sub-structure which includes the <b> node. I hope you
    are withme so far.
    Now try this: var sometext:String = XML( somethings[1]
    ).toString();
    The toString() method should flatten the contents back into a
    string and you can assign that to the htmlText property of the
    control.
    As I said, your XML has to be perfect for this to work. Or
    you have to convince the author(s) of the XML to use CDATA to
    enclose the HTML.

  • Complex Element with Mixed Content problem!!!!1

    Hi All,
    I have a scenario where complex XSD element has mixed content.i.e  it has text and elements. How to deal with it in XI.When i create any complex type in XI i cannot add text to it,i will be able to add only elements enclosed by that complex node. Any ideas on how to get across in Graphical Mapping.
    Regards,
    Sudharshan.
    Message was edited by: Sudharshan Aravamudan

    Hi Sudharshan,
    I dont think it is possible to create such elements in XI. As far as i know a complex element can only contain more nodes of varying occurences, but not some information of it self.
    Just check out these links,
    http://help.sap.com/saphelp_nw04/helpdata/en/3b/d2a3f7a166514abb8cf5635b71974f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2d/c7d9b2d9f138439482a8fafb91f047/content.htm
    I guess the format you are trying to create is actaually something that XI doesnt support.
    Do let me know if you got further queries,
    hope this helps,
    regards,
    Bhavesh

  • Https site with no mixed content and EV cert is shown as mixed and not identifiying itself

    My site https:orderform page contains only https images and website has an EV cert that is valid and current. With history cleared and visiting page for first time Firefox reports that page contains mixed content and that site does not identify iteself.
    Hitting F5 to refresh the page address bar correctly shows green with no mixed content popup and that side idenfies itself.
    SSLCertificateChainFile has been added and this makes no difference.
    Problem does not occur in other browsers (IE, Safari, Chrome).
    A new FF profile has been tried but same problem occurs.
    Why would refeshing the page work?
    Problem affects all firefox browsers 3.5 to 14.01. I dont know about those <3.5.
    I have read and tried most suggestions in forum and elsewhere but cant find a solution.
    I have not provided the url as this is my order page and its important for me to see genuine visitors.

    First a reply to Jsher2000
    Thank you for your suggestions. Yes and Yes did this ages ago but no non-https content.
    I have found a workaround for what appears to be a bug in Firefox:-(
    Here is the non-perfect workaround. First Detect firefox
    xUA=navigator.userAgent.toLowerCase()
    xFf=xUA.indexOf('firefox')!=-1
    if(xFf) top.location.href='https://ord.html'
    else top.location.replace( 'https://ord.html' )
    The current non-secure page is being replaced with a secure one.
    Internet Quote:
    "The difference between location.href and location.replace is that the former creates a new history entry on the visitor's browser meaning that if they hit the back button, they can get in a 'redirection loop' which is usually undesirable and may have unwanted side effects."
    It appears that FF is using some content (cached) from the previous non-secure page when replacing - leading to the mixed content and non-identified site. An F5 refresh or reload of current page will show that site identifies iteself and there is no mixed content.
    In summary its a Firefox Bug.

  • HT1473 I have a large external collection and would like to import a select folder to itunes to create a playlist.  Is there a way to import the folder without mixing the contents with my large itunes library?

    I have a large external collection and would like to import a select folder to itunes to create a playlist.  Is there a way to import the folder without mixing the contents with my large itunes library?
    I'm trying to avoid having to fish through the thousands of songs already in my itunes library to create a playlist from the songs in the windows file that I've already selected.

    You're welcome.
    tt2

  • [svn] 3167: Fixing non-default property usages of CDATA in MXML ( this scenario subtly broke when mixed content support was added).

    Revision: 3167<br />Author:   [email protected]<br />Date:     2008-09-10 11:19:39 -0700 (Wed, 10 Sep 2008)<br /><br />Log Message:<br />-----------<br />Fixing non-default property usages of CDATA in MXML (this scenario subtly broke when mixed content support was added).<br /><br />QE: Yes, please ensure mixed content for MXML 2009 continues to work.<br />Doc: No<br />Checkintests: Pass<br />Reviewer: Discussed with Paul.<br /><br />Bugs:<br />SDK-16771 - Flex 3 MXML code defining an <mx:Array> with child <mx:Object> tags does not compile in Flex 4<br /><br />Ticket Links:<br />------------<br />    http://bugs.adobe.com/jira/browse/SDK-16771<br /><br />Modified Paths:<br />--------------<br />    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/ValueNodeHandler.java

  • Since upgrading to 7.0.3 (iPhone 5 64gb, with iTunes Match enabled) all of my music wiped off my phone.  Downloading it again, most of the artwork has been mixed up with other artists, and I'm no longer able to stream or download over 3G? Any ideas?

    Since upgrading to 7.0.3 (iPhone 5, 64gb, with iTunes Match enabled) almost all of my music has vanished from my phone (weirdly some hasn't).
    Downloading it again, most of the artwork has been mixed up with other artists, and I'm no longer able to stream or download over 3G (all tracks greyed out), though my network settings etc are all set correctly.
    Lastly since upgrading to iOS 7.0.1 (and beyond) Genuis has become effectively useless: it continually asks me to connect to wi-fi, and if I do it creates playlists mostly composed of tracks by the same artists or those very obviously linked to them- previously it created brilliant, nuanced playlists.
    Are these things connected, and how do I fix them?

    I have done this on numerous occasions but I think that my Iphone has a defect. After many tries, reinstalls, deletion of content, changing content to be stored on external hard drive, deleting itunes and cleaning computer I managed to get all of the songs on and things seemed okay for a while.
    The problem returned about a week ago after downloading a new album from Itunes. I now have 12.5k of songs leaving 10gb spare on Iphone which should be more than enough room to operate properly. Last night it seemed to be dowloading ok (after doing all of the above again for the umpteenth time) this morning it revealed that it had just synched 2.5k of songs and 18gb of "other" on the contents bar. it wont synch now as it says its over capacity. So the 18gb of "other" would probably be corrupted data that means it must corrupt each song as it tries to synch it.
    The 2.5k of songs it did synch are working on the Iphone as is every song in the library on Itunes. I did completely delete the new album I bought and redownloaded it from the store then tried to synch just that album and it worked fine.
    Just about time to dump apple I think!

  • A script to force acrobat to play avi content with built in flash player instead of quicktime

    Hello, is there a script that would force acrobat to play embedded avi content with the built in flash player instead of the quicktime player?  first reason is that the built in quicktime player doesn't play the avi files anyway (for me at least); and second is that there are hundreds of sound clips in the pdf, and it is likely that i will have to revise the document and export again, so I can't manually change the properties of each sound clip to open with flash player.  Any thoughts would be appreciated.

    Buy software have wmv to Vp6 function.

  • Looking for a HTTPS/HTTP mixed content "sniffer" tool

    I am hoping someone here can help me out. I am looking for a tool/addon that can point out exact what on the page is triggering a mixed content error. The browser will tell me that something on the page is not secure, but it won't tell me where or what the non secure item is so I can fix it.
    Here is my recent example of this problem.
    I had a issue with a HTTPS page with a doubleclick tracking pixel on it. It was a standard tracking pixel iframed on to the page and the page iframed was HTTPS with no cert problems. It turned out that the page being iframed has a javascript call that was HTTP and this was triggering the mixed content error.
    Unfortunately it took me almost two days to figure out the page being iframed was making the non-ssl call, not anything on the site.
    If anyone here could help me find a tool or point to a browser feature that I don't know about that could help me sniff out these mixed content error faster you would make my life so much easier.

    You can glean a little more information from Firefox's Browser Console (Ctrl+Shift+j). Mixed content blocks generate a log entry in the security category. If you enter mix in the filter box in the upper right of the console, that should help drill down on the message. (Screen shot example attached.)
    Now... you still need to figure out what is generating the request, but hopefully this will help.

  • Mixed Content Error in Application Preview

    Apologies if this has already been addressed. I searched the messages but didn't find one covering this issue.
    When I run a UI5 application in preview from the Web IDE I am getting the following error when I try to call an OData service via HTTP.
    Mixed Content: The page at 'https://webidetestingrxxxnnn.dispatcher.us1.hana.ondemand.com/inde…ashboard&origional-url=index.html&sap-ui-language=en&sap-ui-xx-fakeOS=ipad' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://sapsn1.nnn.com:8000/sap/opu/odata/sap/Z_HR_PEND_APPROVALS_SRV/$metadata?sap-client=020'. This request has been blocked; the content must be served over HTTPS.
    I'm checking with the Gateway team to see if we can get the service available via HTTPS, but I was wondering if there was any configuration option in the HCP cockpit or Web IDE to override this restriction.
    Thanks,
    Dave

    How is the service added to the project?
    Like Maksim suggested, a destination and mapping can be used. Perhaps you've already have done so, but services can be used to create projects with destination usage from Web IDE templates.
    Using an example of an on-premise front-end ABAP system with Gateway components,
    Create a service in the on-premise system
    Use SAP Cloud Connector to connect the on-premise system with SAP HANA Cloud Platform
    Configure a destination for the on-premise system in HCP
    Create a project from template (Fiori, SAPUI5, etc) in Web IDE using the destination and service endpoint
    The destination and mapping are automatically generated in the project.
    Regards,
    Scott

  • Mixed content - https vs http

    In the browser Chrome, after going to a website starting with https://, it gave me the below message:
    Mixed Content: The page at 'https://...' was loaded over HTTPS, but requested an insecure resource 'http://...'. This request has been blocked; the content must be served over HTTPS.
    Which is good but in Firefox, it doesn't recognize this issue which should.
    Can you please update Firefox browser to recognize the issue and give us a proper message like Chrome does?

    I think all browsers allow you to leave a secure page for an insecure page (from HTTPS link to HTTP link) without a warning, otherwise you would go crazy using Google and other search engines that use HTTPS. There is an exception for when a form is being submitted from a secure page to an insecure page: then you definitely should get a warning that your submission isn't being encrypted.
    What Firefox and other browsers now pay closer attention to is content pulled ''into'' the page, treating some as high risk (such as scripts) and some as low risk (such as JPEG images). You can adjust Firefox's settings to block this lower risk "display" content if you like. (It requires switching the security.mixed_content.block_display_content preference from false to true in the about:config preferences editor.)

  • Mixed Content XML

    I am trying to load an XML file which has a mixed content
    model. Here is an example:
    <?xml version="1.0" encoding="utf-8"?>
    <tag1>This is my<tag2>XML</tag2>
    sample</tag1>
    This is XML data and not HTML data.
    Here's my App.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:XML id="tempXML" source="file:///c:/flex/sample.xml"
    />
    </mx:Application>
    I get the following messages:
    Encountered "<tag2>" at line 2, column 17. Was
    expecting: Non-MXML language element ...
    Problem parsing external XML: file:/c:/flex/sample.xml
    Are there workarounds/fixes for this issue? This is valid XML
    and I want to be able to use it to populate data grids and I also
    want to be able to display the XML in a TextArea.

    Let's not give up here. The problem is that you have HTML
    inside of an XML structure and the HTML, because its syntax is just
    like XML, cannot be distinguished by the XML parser. The proper way
    to get your HTML embedded in the XML is to use CDATA. So whoever
    created the XML didn't take that into account.
    I gave this a bit more thought. This will work ONLY if the
    HTML inside of the XML is always complete. No <br> tags
    without a </br>; no <p> without </p> etc. as that
    won't be readable by the XML parser.
    Once you've got your XML structure in Flex, you can get all
    of the <something> items like this:
    var somethings:XMLList = xmlvar.something;
    Now you have an XMLList - an Array of XML structures. This
    means somethings[0] is "some text" but somethings[1] is an XML node
    with a sub-structure which includes the <b> node. I hope you
    are withme so far.
    Now try this: var sometext:String = XML( somethings[1]
    ).toString();
    The toString() method should flatten the contents back into a
    string and you can assign that to the htmlText property of the
    control.
    As I said, your XML has to be perfect for this to work. Or
    you have to convince the author(s) of the XML to use CDATA to
    enclose the HTML.

  • Using RSLs results in a mixed content warning in Chrome?  When did this start happening?

    Hello All,
    We've got a secure (delivered via HTTPS) Flex app that has been using RSLs for years.  Just today, I noticed that Chrome was showing a "mixed content" warning for our app.
    We're not getting this same warning in IE or Firefox.  I poured over the requests in Chrome's developer tools, and there were only two HTTP requests:
    http://fpdownload.adobe.com/pub/swz/crossdomain.xml
    http://fpdownload.adobe.com/crossdomain.xml
    These both appear related to the Adobe hosted Flex RSLs.
    I changed my compilation options to merge libraries into code (no RSLs).  As soon as I did this, the mixed content warning in Chrome went away (and so did these two HTTP requests).  Switch back to RSLs, and the mixed content warning comes back (along with the two HTTP requests).
    Turning off RSLs makes my app quite a bit fatter--over 600kb fatter.  That's a lot.  I want to use RSLs, like we've been doing in the past!  How can this be fixed?
    Chrome Version: 22.0.1229.94 m
    Flash Player Version: 11.4.31.110
    OS Version: Windows 7, 64 bit
    Complete User-Agent string:
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

    After looking through the Build->Properties->Flex Build Path->Library Path settings, I found that the RSLs each have a "Deployment Path/URL" and "Policy file URL" value.  For instance, for the text layout RSL, we've got:
    Deployment Path/URL: http://fpdownload.adobe.com/pub/swz/tlf/1.0.0.595/textLayout_1.0.0.595.swz
    Policy file URL: http://fpdownload.adobe.com/pub/swz/crossdomain.xml
    I went through each of the RSLs and changed both deployment and policy URLs to use HTTPS.
    Once I did this, the mixed content warning in Chrome stopped showing up.
    But I'm still at a loss as to why this started happening in the first place.  As I indicated in my original post, we've had this app running for years and this is the first we've noticed a mixed content warning in any browser.  What's going on?
      -Josh

Maybe you are looking for

  • How To Process an XML File

    Hi All Clasic ASP MySQL Win 2K Server I have an XML file that is uploaded from clients via a browser which contains job data. Once uploaded I need to process it into a MySQL DB using classic ASP. The file contains 3 lots of elements under the main jo

  • Problem with Subform Instances at First Opening

    Hi All, I have a large, complex form that has several subforms that I need to have zero instances the first time the form is opened. Most of those subforms that I set the initial instances = 0 on the Object pallet do exactly that--they behave and ope

  • Digital signature for bid

    Hi  experts i want to operate digital signature for bid i activate digital signature for bid we want to try to use system signature with auto by sap user id/passward what should i do to make it work ?? almog

  • About ready to smash my T60...

    Just reformatted......... now I can't access windows updates at all... This is complete BS..  I get to the website that has the options to get the express updates or custom updates, i click on express, and i get this message: The website has encounte

  • Problem exporting to .swf from ID CS5

    Hello all. I have an 18-page InDesign document with animation, buttons, etc and just tried exporting it as a swf. I get a separate swf file for every page, but my client has requested a single swf file containing all the pages. I just watched a video