best way to parse XML without a XSD

Hello

In the past whenever I've had to deal with XML, I had an XSD that I could use to marshal the XML in a bean. But now I have to communicate to an API that returns XML that have no any XSD or other type of document description XML.

I was going to just to use string mute and corresponding analysis. Is there a better way to deal with this? Is there like a tool or library that will be the input XML ICD and put it in a container that is widespread with cards and such that I can pull the data I want?

Thank you
Jose

>
In the past whenever I've had to deal with XML, I had an XSD that I could use to marshal the XML in a bean. But now I have to communicate to an API that returns XML that have no any XSD or other type of document description XML.

I was going to just to use string mute and corresponding analysis. Is there a better way to deal with this? Is there like a tool or library that will be the input XML ICD and put it in a container that is widespread with cards and such that I can pull the data I want?
>
So what stops you to create your own XSD?

The basic structure you need to analyze and process the data anyway. So why not simply capture the structure you need in an XSD, and then use this XSD the same way you have always (e.g. XMLBeans or other).

If you are looking for on the net you can find some freeware libraries that can create a basic XSD from an XML doc. More complete example XML is the best work they can do. Use one of those to get the first draft of a XSD and then to embellish it.

You can also use Apache Commons Digester to only have access to the raw XML data.
http://Commons.Apache.org/proper/Commons-digester/

Tags: Java

Similar Questions

  • Best way to Parse XML using Dreamweaver CC 2015.3

    I was on a wild goose chase - trying to figure out how to parse XML using DW CC

    every article I read, says something about XML & XSLT, but it is no longer available in the new CC - I read about using jQuery or php, but have not yet find a resource to learn specifically "using DW CC.

    I'm willing to learn how to parse XML with DW CC but I would get a definitive direction to go before I'm trying to learn something that adobe will put in 'end of life '.

    advice or links to resources that can parse XML DW CC 2015 would be LARGELY APPRECIATED, thank you

    x 126 has written:

    What I'm asking is...

    1. What is the best procedure to insert XML into a page using DW CC 2015 as my editor?
    a. what happened to spry? b. what happened to XSLT?

    As Nancy explained, Spry has been abandoned by Adobe, a few years ago.

    XSLT server behavior has been removed at the same time as other server behaviors Dreamweaver CC. The problem with most of the PHP server behaviors was that they were based on code that has been removed from PHP 7. The XSLT server behavior didn't rely on these features, but it was not the most friendly of server behaviors. XSLT is a complex language that is to be avoided when parsing XML unless you really know what you're doing.

    The easiest way to manipulate XML in Dreamweaver should use PHP SimpleXML. I've linked to the samples page in the PHP online documentation. Believe me, it's much easier than trying to do battle with XSLT. If you have a subscription to lynda.com, you can learn more about SimpleXML to my operational with SimpleXMLclass.

  • Best way to parse a delimited string

    Hello-

    I am trying to understand better, more concise way to parse this string:
    'FNAME=JANE|L_NAME=DOE|ACTIVE_PLAN_CODE=Y0|BEN_MOD_ID=4695'
    I played a bit with using Substr and Instr, but the code seems to have a little messy, so I thought I would check to see if there was an easier way.

    Are the values that I need to analyze
    Jane, Doe, YO, 4695.
    Thank you!
    Christine

    Maybe like this

    SQL> with dat as (
        Select 'FNAME=JANE|L_NAME=DOE|ACTIVE_PLAN_CODE=Y0|BEN_MOD_ID=4695' col from dual
        )
        select
                InitCap(regexp_substr(col,'[^=|]+',1,2))||',' col1
        ,       InitCap(regexp_substr(col,'[^=|]+',1,4))||',' col2
        ,       regexp_substr(col,'[^=|]+',1,6)||',' col3
        ,       regexp_substr(col,'[^=|]+',1,8)||'.' col4
        from       dat
    /
    
    COL1  COL2 COL COL4
    ----- ---- --- -----
    Jane, Doe, Y0, 4695.
    

    SS

  • Best way to parse a string for use in a lookup table?

    I am trying to create a system by which users can create a premade simulation and store simulations in order to easily load at their convenience. The way it works now is that when the user creates a simulation, information on the characteristics of the simulation are condensed down to a 12 string, which is written in a text file with the same name as its content. This string is then read, and ideally, I would have some sort of lookup table to convert characters in the information they have been condensed to. For example, a variable X can have possible values {650,720,851} who gets the mapping to {A, B, C} during the creation process. When loading, I would be able to send in a Sub C - VI and took her out in 851, group in a cluster. How can I perfectly realize this in LV? So far the best I have is this messy thing:

    Basically, who runs the string character by character and includes the appropriate value for the character at the given offset.

    You want to use the configuration VI palette.

    These screws makes it stupid simple save and load the values in the file by using Sections and keys.

    You can use the keys 'A', 'B' or 'C' and section 'X' to complete your example.

  • the best way to use flash without giving up the SEO

    Is a Flash CMS website gives you the best of both worlds? I want a "flashy" site but I need to be searchable. "." Is a Flash CMS site rank well enough to do the job? , If it ranks well, it's because the portions Flash would get no SEO, but the HTML parts would be?... OR is it something fundamentally lacking in the software it will keep low on the rankings, no matter what the relationship between Flash and HTML on this site?

    A site in HTML with Flash plugins would hurt my ranking much?

    Could I solve my problem better by having a based HTML landing page which gives access to the 2 sites, only strictly HTML and Flash or Flash CMS based? Assuming that the landing page and the HTML parts are optimized properly, is the content that is on the page of launch of HTML and HTML site going to give me good SEO results, although one of the options to choose is a Flash site?

    Here are some resources that you may find useful...

    SEO Flash
    ---------

    http://www.SEOBook.com/archives/001457.shtml

    http://www.flashseo.com/

    http://blog.searchenginewatch.com/090317-120653

    and the O'Reilly book: Search Engine Optimization for Flash by Todd Perkins, ISBN: 978-0-596-52252-0

  • Best option for creating XML

    Hello

    I am facing problem,

    I have created the XML file, but I can't see it / exit it.

    Please can anyone suggest what's best way to create xml files?

    (1) create xml with DocumentBuilderFactory and then analyze or

    (2) manually create xml hardcoded and save it to the sd card and then access it for analysis.

    I have continuously variable data text in xml files.

    What approach will be following me more?

    Help, please.

    Thank you

    Françoise.

    Why you are unable to view the XML file? How to read as a byte array and look into the debugger? That way at least you can check the syntax of the XML prologue is correct. Then, you can read in as an array of characters using the appropriate encoding and check the syntax of the entire file.

    Regarding the creation of XML code, the best approach depends entirely on what you start with. You have built a DOM model or or do you have custom data structures you want to encode?

    The XMLWriter class in net.rim.device.api.xml.jaxp is not all that useful for generating XML, because it is designed to be used as a Manager when parsing existing XML - it is more than an XML processor to an XML writer. It's not too hard to write your own code to generate XML; a search on the web will be probably some examples of implementation.

    To find out where to keep the XML on the device: the file system, permanent storage, or RMS all work fine. Your basis in the analysis job it will be to open an input stream on what you've stored, create an InputSource of the stream and feed it to one of the analyzers. In general, unless you really need to generate a DOM model, the approach of SAX parser is much more effective. You can create your custom data directly structures as the analysis takes place, rather than going back in a DOM trying to get information. Still, a web search for "SAX compared to DOM parsing" or a similar collection of key words meet a number of good tutorials on how to do this.

    PS After re-reading your original post, I think you may be confused about something. The DocumentBuilderFactory and the SAXParserFactory are tools to transform XML in an internal data structure. You do not use them to go the other way. For this, you are going to have to write your own code, or find others, you can borrow; I don't think that there is something useful in the RIM API. (XMLWriter can be used to move from the existing to the new, equivalent XML, XML, which is not that it would be useful for you.)

  • Parsing XML in ColdFusion 5

    Hello there,

    It's not like there is a native way to parse XML in ColdFusion version 5.0. ColdFusion MX makes it easier to work with XML, but unfortunately I am working under Windows with a CF5 server.

    I've gotten to the point of use CFHTTP to retrieve XML content in a variable, but I don't know the best way to decompress the data in a query, or another structure that I can use to feed the rest of the model. I thought to save the content of a file and then a loop top, but something tells me that it is an inefficient way to do the job.

    I would like to avoid having to install any additional software, but if it's the only way to process XML in CF5, then I would be grateful for any recommendations on the best tools to evaluate or buy. Or if there is a way to do it in JavaScript, it would be great, too.

    Thanks for any help!

    try to use SoXML, it is a custom tag, is free and can be downloaded from the Adobe Exchange website

    --> Adobe Exchange link

    M

  • Best way to import video files into iMovie 10.0.8 of the Sony AS100v

    Best way to imort videos without losing quality. My operating system is Yosemite 10.10.3

    This device is not listed as compatible with iMovie 10 (iMovie support cameras - Apple Support)

    so, you will probably need to remove the SD card in the device and plug it into an SD card reader (if there is not one already built-in to your Mac).  You can then import the clips here.  XAVC-S format used by the camera is supported by the latest version of iMovie (10.1.2) that requires El Capitan.  I'm not sure whether 10.0.8 done.  If this isn't the case, Google search will reveal a number of apps that claim to do a conversion.

    Geoff.

  • Best way to run a LabVIEW VI, written for Windows in a MAC OSx environment

    I've written a VI in LabVIEW 8.6 Windows XP and it compiled into a .exe.  Now, I want you to run this executable on a MAC OS x computer.  What is the best way to do this without having to buy a LabVIEW for MAC license or machine virtual Windows for MAC software?

    Thank you

    CJL

    CJL,

    Yes, that should run.   Except... Your show is there any material?  To use all the functions that are specific to Windows (from the platform folder)? It relies on a video driver specific or sound card? It relies on mouse right click action?  All these kinds of things may or may not work because they are closely linked in the Windows operating system and the underlying hardware.  While the software itself will problaby execute, the programmay does not work as expected if some of these dependencies are handled differently by the Apple hardware.

    I have not used VM but native running under Bootcamp works fairly well, again allowing the issues mentioned above.

    Lynn

  • What is the best way to reward a visitor with a unique song download to complete the form?

    In the re-design of my songwriting site, I want to reward my fan to fill a form with a single download of a song professionally recorded of their choice. What is the best way to do this without abusing? I want to maximize downloads from iTunes, where the fan pays for my downloads of the song.

    Paige Powell

    Hi Paige

    If I'm not mistaken, you want when the user submits a form, then they should be able to download a song of their choice?

    This would require customization because it involves the submission of the form, redirect to a page with songs and then limit the user to download.

    Presentation form redirect to a specific page can be done by using the form action url editing.

    On the destination page, link text of song with downloaded audio files on the site and list them on the page.

    Restrict the user to download more, use custom code to achieve this.

    British Colombia, you can achieve this by using media and connection modules to a secure area, please let me know if you are Business Catalyst to host the site so I will give you the steps as the way in which this can be achieved at the end of BC.

    Thank you

    Sanjit

  • The best way to migrate data... Opinion please...

    Guys,

    I'm working on a solution for a customer who needs to move in a new SAN SAN data.

    Existing SAN is attached to the ESX server farm and is very close to the location of a new SAN. In your opinion, what is the best way to move data without interruption to VM ESX farm?

    I know we can do SAN replication, but right now, I don't know if the SAN is still the same provider.

    I know we can do Storage VMotion. In this case, he should present the new SAN somehow for the existing ESX servers.

    I know that we can probably use the converter to migrate virtual machines. This can take some time because we would go over WAN.

    What are your thoughts?

    Thanks in advance for your comments!

    With 4 TB of data, I wouldn't pass on the replication SAN or WAN solution of optimization of the property, and it can fly quickly with 4 TB of data that you use storage vmotion which basically depends on how your WAN links are, if if its quick to go for it.  There is not another free solution then this but if you can manage somehow to make backup of system state of all virtual machines, and then you can ship these backup data to remote locations and import, save back to clusters.  You have to do the actual calculation how fast you can Transfer data from the siteA-> siteB Mbps?  This will give you a clearer picture of how long it will take and picture plan here.  I could do that during maintenance or weekend windows that are the least impact to users and systems.

    If you found this information useful, please consider awarding points to 'Correct' or 'useful '. Thank you!!!

    Kind regards

    Stefan Nguyen

    VMware vExpert 2009

    iGeek Systems Inc.

    VMware, Citrix, Microsoft Consultant

  • What is the best way to correct the registry errors without the use of a registry cleaner in XP?

    I am sorry to raise this issue that so many people who have asked me.  I read pages and pages of discussions on the MS forum on this subject, and without exception, all the experts said Microsoft registry cleaners are completely unnecessary and that junk in the registers has no performance impact at all.  Instead, they say, to do x, y and z.  I am running Windows XP on my desk for five years, and gradually, he got so slow it's almost unbearable.  It takes 10-15 minutes just to start, and sometimes it takes 2 minutes or more just to open a window of browser (IE8) or go to the previous page by using the arrow to the left.  Before you tell me all the things it could be, please let me say that:

    1. my PC has not always been this slow!  It is getting worse.

    2. all my Windows software is up to date.  I have automatic updates on.

    3. I have a lot of disk space, almost 75% of free space on a hard drive of 80 GB.

    4. my PC is free of viruses, spyware and Trojans.  I have McAfee antivirus running and I also sometimes run Malwarebytes and Trojan Killer, because they always find things that don't have McAfee.

    5. I defragment my hard drive on a regular basis.

    6. I regularly delete all my temporary files by using the Windows Disk Cleanup utility.

    7. I have very little, if any "Add-ons".  No toolbar Yahoo or Google (or Bing!).

    8. I removed nearly every program that I start, so that they are not running in the background.

    9. I uninstalled all the programs that I don't use.

    However, I still have a slow ever-more computer.  Sometimes, when I see ads on TV to increase the speed of my PC, I download the 'free' software, and they claim to find hundreds or thousands of "registry errors.  When I look at the newspapers, I see many entries in registry for 'Netscape' and 'Google Earth', which I uninstalled years ago, as well as entries for the videos that I downloaded, seen once, and deleted a long time ago.

    So, what's the problem?  If it's not related to my registry (which Trojan Killer says has more 6 000 entries!), what else could be?  I would appreciate greatly any advice you can give, because there are dozens of companies on their touting their registry cleaners and the uninstall (for a price) programs, and after reading reviews of the MS MVPs, I'm skeptical of their claims.  Thank you.  :)

    I can't disagree with a lot of things have already been said.

    I'm willing to accept that your machine does actually takes 10 to 15 minutes on the clock. It's completely absurd.

    Some people call your "Windows Rot" problem. Becomes just the slower windows over time. It is a collection of things that are happening in the background. Yes I believe that the register contributes. Using a registry cleaner is not a "magic" solution But it can help a little.

    The PC care program/process you described is above average.  I suggest you add CCleaner. Disk Cleanup is not bad, CCleaner is better, cleaning of other stuff which does not resemble the DC. It won't be a significant difference because disk space is not your problem, but it will help a little.

    'Play' with the registry is VERY risky. If you decide to go ahead, I would say that first make you a copy of the full image backup using a utility that can be started and run from a CD/DVD. Just in case the registry cleaner breaks of your machine.

    Registry cleaners is that they take a "best estimate" to what is no longer necessary. Sometimes they think wrong. And each vacuum cleaner will clean slightly different sets of places.  If the tool does not provide a way to back up the registry before you start cleaning, do not use it. He is not careful enough.

    If vacuuming offer 'levels' of cleaning, enjoy. Open for more aggressive cleaning, with resetting and long series of normal use between cleanings.

    You are looking for a tool which also makes registry "defragmentation". The registry is a database that get disorganized by additions and deletions. Defragmentation will be re - organize and get rid of a 'lost' space, making it the smallest file, afterwards faster to read.  It is not something you need to do frequently, but since you've never done it in 5 years, it would help, after cleaning registry.

    Another place to find CPU and RAM wasted resources is Windows Services. These are small programs that start at boot time. They run in the background and provide support services to all applications or specific applications.  Many applications services are running even though you don't really need them. You can find information on which you can set by Googling for 'Windows XP hardening'. There are a lot of sites with good information. They call it hardening because by disabling unnecessary stuff, you leave less possible openings for the "bad guys" to the attack.

    Ultimately, I think your best bet will simply bite the bullet and re - install windows and all your applications. It's the best way to restore your computer to almost any performance fees factory. (It is not exactly factory fresh because you need to add a ton of Windows updates).

    Before you re-install, do copy image 1 or more full backups. At least one must be done using a tool that will easily allow you to extract the files. You data backup files separately to make it easier to restore the reinstallation. IE, copy it to a USB key.

    Many "experts" actually expect to, and do, re - install windows every 6-12 months!  I think it's a bit exaggerated, but they swear by it.

    Once you do your re - install, create a copy of the magnified image
    Install a firewall application (before the windows updates)
    Once you do all updates of windows, create a copy of the magnified image
    After that you re-install all your apps, create another copy of the complete picture.

    In this way, in the future, you have more current points to restore your computer to. It will reduce the time you spend to get back to the current configuration.

    On a 5 year old XP machine, you have probably 512 MB - 1 GB of RAM. You might also consider taking in the shop (or DIY) and bump the RAM up to at least 2 GB or better still max out.  The current versions of the applications use much more memory than they did 5 years ago. Even XP will be since he has been seriously corrected since then.

  • What is the best way to edit the pixels of the layer without applying the image?

    Help, please!?

    What is the best way to change the pixels on a new layer (clone, healing, patch or selection) without applying the image? When I do that, I can't change the under layer if I make a mistake.

    Does this make any sense!

    You want to use the patch tool to put the fix on its own layer? Use sample all layers in the Options bar.

  • What is the best way to get certificate of secure Channel, including CCNA, expensive etc. without training?

    Currently, what is the best way to get certificate of secure Channel, including CCNA, etc.?

    In the past, there is a way to get VCP using CCNA without expensive training

    Path 2 on this page: VCP6-NV Certification

    There was already an expiration date on the possibility of using a Cisco certification have the implemented training obligation, but the expiration date has been removed.

  • best way to test mobile models without owning the devices

    I'm testing web phone and Tablet designs, but cannot afford to buy same devices 3 or 4 and still less the dozens that need to be tested today. What is the best way to get accurate results without buying a dozen of aid. I have a subscription 'CC', but there is apparently nothing to help. There used to be a program called "Device Central" in the creative suites, but it disappeared. I left design 2 years ago because of all the design tests question but would like to start over.  I'm tired of watching the tutorials on the subject, only to find out that they don't work without the devices.  Advice or recommendations would be greatly appreciated. TIA.

    You'll make yourself crazy trying to conceive for each device.

    Create your sites a combination of responsiveness (using queries media to target a small number of the most common devices attached) and liquid (using width percentages calculated for 'steps' in your MQ of transition smoothly on the intermediate devices).

Maybe you are looking for

  • Download iLife 06?

    Hello I have a PowerBook G4, running 10.4.11.  I tried to install iLife 08 on that, but iMovie requires an Intel processor.  This link is dead: http://www.apple.com/support/downloads/imovieHD6.html. Where can I find a free download of it, or cached a

  • 3 years old A100-001: when you play horizontal lines

    Dear everyone! I have a laptop Satellite A100-001, almost 3 years, with 3 GB of RAM, nVidia GO 7600 256 MbRam VGA with Windows 7 Professional 32 bit OS (6 month) rather cool. I use my laptop every day, especially for work or look at. I've never had a

  • Satellite L40 cannot start or recognize the hard drive

    Hi all I bought a new Satellite L40 without windows or CD come with him,so now when I put the Xp CD, the drive cannot recognized the hard drive or a CD-Rom. error messageReboot and select boot device prober, or insert boot media in selected boot devi

  • 800703F1, C 8007371 error: cannot install updates for windows 7 (x 64)

    I tried to update Windows for a few days, and none of the updates install. some fail to install with the above error codes, and those who have need of a reset then fails. I tried using Microsoft to solve this problem, the normal and aggressie options

  • How to scan multiple pages with Photosmart 6510?

    Hello I am a new user of all-in one Photosmart 6510. Does anyone know how to scan multiple pages into a single document? Thank you!