Unmarshall and Marshall back to XML yeild different result

Hi,
Iam unmarshalling input.xml to an java object and marshal it back to xml string. Iam not getting the same result. Any light on this? Is is because of the anyType? If validate the unmarshalled object it throws an error, but if i dont validate the code works giving the following result.
PTest.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://test.com"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://test.com"
elementFormDefault="qualified">
<complexType name="POuterType" abstract="true">
<sequence>
<choice>
<element name="Inner1" type="anyType" />
<element name="Inner2" type="anyType"/>
</choice>
</sequence>
</complexType>
</schema>
Test.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://test.com"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://test.com" elementFormDefault="qualified" >
<include schemaLocation="PTest.xsd"></include>
<complexType name="OuterType">
<complexContent>
<restriction base="tns:POuterType">
<sequence>
<choice>
<element name="Inner1">
<complexType>
<sequence>
<element name="TimeStamp" type="dateTime">
</element>
</sequence>
</complexType>
</element>
<element name="Inner2">
<complexType>
<sequence>
<element name="TimeStamp" type="dateTime">
</element>
</sequence>
</complexType>
</element>
</choice>
</sequence>
</restriction>
</complexContent>
</complexType>
<element name="Outer" type="tnsuterType"></element>
</schema>
Test.xml
<?xml version="1.0" encoding="UTF-8"?>
<tnsuter xmlns:tns="http://test.com"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://test.com Test.xsd ">
<tns:Inner1>
<tns:TimeStamp>2001-12-31T12:00:00</tns:TimeStamp>
</tns:Inner1>
</tnsuter>
Main.java
public static void main(String[] args) throws Exception {
JAXBContext ctx = JAXBContext.newInstance("test.vo" );
Unmarshaller unmarsh = ctx.createUnmarshaller();
Marshaller marsh = ctx.createMarshaller();
marsh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true));
marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://test.com Test.xsd");
Validator validator = ctx.createValidator();
//Create an Object
ObjectFactory obj = new ObjectFactory();
Outer out =
(Outer)unmarsh.unmarshal(
new FileInputStream( "e:/agilan/JAXBTest/JAXBTe/references/XMLSchema/test/Test.xml" ) );
StringWriter sw2 = new StringWriter();
marsh.marshal(out, new PrintWriter(sw2) );
StringBuffer sb2 = sw2.getBuffer();
System.out.println(sb2.toString() );
Result
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Outer xsi:schemaLocation="http://test.com Test.xsd" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://test.com">
<Inner1>
</Inner1>
</Outer>
Please not the timestamp tag is missing, which is present in the input.xml
Iam struck up with is problem for the past 5days, without any clue. Please help.
Additionally if I add the validation code after unmarsh.unmarshal(..).
Iam getting the following exception
Exception in thread "main" com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
     at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:199)
     at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:166)
     at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:336)
     at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
     at test.vo.impl.POuterTypeImpl.serializeBody(POuterTypeImpl.java:61)
     at test.vo.impl.OuterTypeImpl.serializeBody(OuterTypeImpl.java:30)
     at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
     at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
     at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
     at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:366)
     at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
     at test.vo.impl.OuterImpl.serializeBody(OuterImpl.java:87)
     at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
     at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
     at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
     at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:121)
     at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
     at client.Main.main(Main.java:72)
--------------- linked to ------------------
javax.xml.bind.ValidationException
- with linked exception:
[com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>]
     at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:131)
     at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
     at client.Main.main(Main.java:72)
DefaultValidationEventHandler: [ERROR]: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
Location: obj: test.vo.impl.OuterTypeImpl@f84386
Iam badly struckup with this problem for the past 5 days please help

Hi,
Iam unmarshalling input.xml to an java object and marshal it back to xml string. Iam not getting the same result. Any light on this? Is is because of the anyType? If validate the unmarshalled object it throws an error, but if i dont validate the code works giving the following result.
PTest.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://test.com"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://test.com"
elementFormDefault="qualified">
<complexType name="POuterType" abstract="true">
<sequence>
<choice>
<element name="Inner1" type="anyType" />
<element name="Inner2" type="anyType"/>
</choice>
</sequence>
</complexType>
</schema>
Test.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://test.com"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://test.com" elementFormDefault="qualified" >
<include schemaLocation="PTest.xsd"></include>
<complexType name="OuterType">
<complexContent>
<restriction base="tns:POuterType">
<sequence>
<choice>
<element name="Inner1">
<complexType>
<sequence>
<element name="TimeStamp" type="dateTime">
</element>
</sequence>
</complexType>
</element>
<element name="Inner2">
<complexType>
<sequence>
<element name="TimeStamp" type="dateTime">
</element>
</sequence>
</complexType>
</element>
</choice>
</sequence>
</restriction>
</complexContent>
</complexType>
<element name="Outer" type="tnsuterType"></element>
</schema>
Test.xml
<?xml version="1.0" encoding="UTF-8"?>
<tnsuter xmlns:tns="http://test.com"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://test.com Test.xsd ">
<tns:Inner1>
<tns:TimeStamp>2001-12-31T12:00:00</tns:TimeStamp>
</tns:Inner1>
</tnsuter>
Main.java
public static void main(String[] args) throws Exception {
JAXBContext ctx = JAXBContext.newInstance("test.vo" );
Unmarshaller unmarsh = ctx.createUnmarshaller();
Marshaller marsh = ctx.createMarshaller();
marsh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true));
marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://test.com Test.xsd");
Validator validator = ctx.createValidator();
//Create an Object
ObjectFactory obj = new ObjectFactory();
Outer out =
(Outer)unmarsh.unmarshal(
new FileInputStream( "e:/agilan/JAXBTest/JAXBTe/references/XMLSchema/test/Test.xml" ) );
StringWriter sw2 = new StringWriter();
marsh.marshal(out, new PrintWriter(sw2) );
StringBuffer sb2 = sw2.getBuffer();
System.out.println(sb2.toString() );
Result
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Outer xsi:schemaLocation="http://test.com Test.xsd" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://test.com">
<Inner1>
</Inner1>
</Outer>
Please not the timestamp tag is missing, which is present in the input.xml
Iam struck up with is problem for the past 5days, without any clue. Please help.
Additionally if I add the validation code after unmarsh.unmarshal(..).
Iam getting the following exception
Exception in thread "main" com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
     at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:199)
     at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:166)
     at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:336)
     at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
     at test.vo.impl.POuterTypeImpl.serializeBody(POuterTypeImpl.java:61)
     at test.vo.impl.OuterTypeImpl.serializeBody(OuterTypeImpl.java:30)
     at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
     at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
     at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
     at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:366)
     at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
     at test.vo.impl.OuterImpl.serializeBody(OuterImpl.java:87)
     at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
     at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
     at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
     at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:121)
     at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
     at client.Main.main(Main.java:72)
--------------- linked to ------------------
javax.xml.bind.ValidationException
- with linked exception:
[com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>]
     at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:131)
     at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
     at client.Main.main(Main.java:72)
DefaultValidationEventHandler: [ERROR]: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
Location: obj: test.vo.impl.OuterTypeImpl@f84386
Iam badly struckup with this problem for the past 5 days please help

Similar Messages

  • I would like to know how to sign out of facetime and sign back in with a different apple ID

    I signed with my apple id on facetime just to see if it was working but i got the computer for my mom and i want to put her apple id instead of mine but i can not figure out how to log out and sign back in a......can any one please help me!!!!!!!!!!!!!!!!!!!!

    Roger,
    rkaufmann87 wrote:
    Open Facetime, click the Facetime menu and click Preferences. If you prefer keyboard shortcuts in any app, just click Command + Spacebar and this will open Preferences.
    Roger
    Some users may have Spotlight set up for that keyboard shortcut.
    The most common keyboard shortcut application Preferences is (Command + ,).

  • Exporting from Lightroom to Photoshop and back to Lightroom shows different results in Lightroom than in Photoshop

    I has set the color space to ProPhoto RGB in both Lightroom and Photoshop. I have also calibrated my monitor.
    But when I export a photo from Lightroom to Photoshop and edit it there before saving it, the photo in Lightroom is very different than what the Photoshop edit shows.
    Photoshop is to the left, Lightroom to the right.

    Ask in the LR/ PS forums and provide details about your system, your files, your develop settings, other stuff. You need to be much more specific.
    Mylenium

  • Sandpit and Dev give Address search with different results using Web UI

    Using the Sandpit system I can perform a BP search on Street and enter the post code, but it still finds the right address. However, in our development sytsem it does not. The FM which performs the search is identical so I assume this would be down to some kind of address related config?. Can anyone enlighten me further as what could possible cause this?.
    Jason
    [RESOLVED]
    Edited by: Jason Stratham on Sep 8, 2009 11:35 AM

    Okay. So, I asked the admin to create a scope for the list, which they did following the steps outlined in Ben Tedders article, and then I followed the steps in the rest of the article setting up the web parts. When I ran a search, it returned the no results
    page. Not sure why, but I removed the scope from the Search Core Results web part, and the search returned usable data from the list.
    Here's my part ii question - - how do I customize the Search Core Results web part to display the data from the search in manner that makes more sense than from a list of nondescript layout of,
    Search Result
         Search Term ... dataField01 ... dataField02 ... dataField03 ... dataField04 ...
         author info
    url info
    to something a tad more informative, such as,
    You search for Search Term, with the following results:
         Search Result
              dataField01 label ... dataField01
              dataField02 label ... dataField02
              dataField03 label ... dataField03
              dataField04 label ... dataField04
    because nobody's really going to care who uploaded the list or want to link to the data pulled from the list in one of those columnar results tables.

  • SELECT with and without for all entries giving different results

    Hi All,
    For some reason unknown to me ,
    There is a difference in result between the below mentioned query however the logic is same.
    1 .  lw_ebeln-EBELN = '0000366416'.
         APPEND lw_ebeln to lt_ebeln. 
          SELECT    ebeln
         FROM     ekbe
         INTO TABLE lt_ekbe
         FOR ALL ENTRIES IN lt_ebeln
         WHERE ebeln = lt_ebeln-ebeln
    2. SELECT ebeln from ekbe into table lt_ekbe where
    ebeln = '0000366416'..
    I have tried a lot to find the reason but unable to.
    Thanks,
    Faiz

    Hi faizur,
    Hope it help ful.
    If you add the EBELP in Internal table,  you will be getting same number of entries in both query.
    For all entries Removes the Duplicate key.
    Regards,
    Venkat.

  • Marshalling 'autotype' generated objects back to XML

    I have a document-literal webservice implementation that uses
    WebLogic request/response binding classes generated by
    'autotype'. My trouble is that there does not seem to be any way to programmatically
    transform these Java objects back into XML form. I'm fairly new to web services
    development with webLogic, so I may be missing something, and my hope is that
    there is a straight-forward solution for this.
    I have tried to use the serialize method from the Codec class, but something in
    the underlying implementation throws a NullPointerException in reference to the
    SerializationContext object. And I can't seem to find any documentation on this
    object, or anything explicitly pertaining to marshalling back to XML. So at this
    point, my less than desirable approach is to create a set of parallel classes
    using JAXB, so that I can have access to the JAXBContext marshaller.
    Here is the underlying method for our web service operation (which unsuccessfully
    calls the serialize method on the codec class):
    public com.hp.bea.OutValidateConfig validate_v1_2(com.hp.bea.InValidateConfig
    validateRequest)
    InValidateConfigCodec vcrequestCodec = new InValidateConfigCodec();
    weblogic.xml.stream.XMLName xmlType =
    weblogic.xml.stream.ElementFactory.createXMLName( "http://production.psg.hp.com/types"
    , "InValidateConfigType" );
    try {
    DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document vcDoc = docBuilder.newDocument();
    XMLOutputStream xmlOutputStream = XMLOutputStreamFactory.newInstance().newOutputStream(vcDoc);
    SerializationContext ctx= SerializationContextFactory.newInstance().createSerializationContext();
    // ctx.setNamespacePrefixMap();
    if ( validateRequest == null )
    System.out.println("ValidateRequest is null");
    else
    System.out.println("ValidateRequest is not null");
    System.out.println(validateRequest);
    try
    vcrequestCodec.serialize(validateRequest, xmlType, xmlOutputStream, ctx);
    catch (Exception excp)
    excp.printStackTrace();
    // TODO - call service handler
    Document vcResp = docBuilder.newDocument();
    OutValidateConfigCodec vcResponseCodec = new OutValidateConfigCodec();
    XMLInputStream xmlInputStream = XMLInputStreamFactory.newInstance().newInputStream(vcResp);
    DeserializationContext dCtx= DeserializationContextFactory.newInstance().createDeserializationContext();
    vcResponseCodec.deserialize(xmlType, xmlInputStream, dCtx);
    } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    return null;
    There must be something I'm missing, because I'm sure there is a simple way to
    Marshall my object back to XML. Am I using the wrong API? Can someone please
    shed some light on this? Any insight or suggestions are much appreciated.
    Thank you,
    Matt

    Hi Matthew,
    Try this example from Manoj [1] and see it fits your use case.
    Hope this helps,
    Bruce
    [1]
    http://www.manojc.com/?sample43
    Matthew Cohen wrote:
    >
    I have a document-literal webservice implementation that uses
    WebLogic request/response binding classes generated by
    'autotype'. My trouble is that there does not seem to be any way to programmatically
    transform these Java objects back into XML form. I'm fairly new to web services
    development with webLogic, so I may be missing something, and my hope is that
    there is a straight-forward solution for this.
    I have tried to use the serialize method from the Codec class, but something in
    the underlying implementation throws a NullPointerException in reference to the
    SerializationContext object. And I can't seem to find any documentation on this
    object, or anything explicitly pertaining to marshalling back to XML. So at this
    point, my less than desirable approach is to create a set of parallel classes
    using JAXB, so that I can have access to the JAXBContext marshaller.
    Here is the underlying method for our web service operation (which unsuccessfully
    calls the serialize method on the codec class):
    public com.hp.bea.OutValidateConfig validate_v1_2(com.hp.bea.InValidateConfig
    validateRequest)
    InValidateConfigCodec vcrequestCodec = new InValidateConfigCodec();
    weblogic.xml.stream.XMLName xmlType =
    weblogic.xml.stream.ElementFactory.createXMLName( "http://production.psg.hp.com/types"
    , "InValidateConfigType" );
    try {
    DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document vcDoc = docBuilder.newDocument();
    XMLOutputStream xmlOutputStream = XMLOutputStreamFactory.newInstance().newOutputStream(vcDoc);
    SerializationContext ctx= SerializationContextFactory.newInstance().createSerializationContext();
    // ctx.setNamespacePrefixMap();
    if ( validateRequest == null )
    System.out.println("ValidateRequest is null");
    else
    System.out.println("ValidateRequest is not null");
    System.out.println(validateRequest);
    try
    vcrequestCodec.serialize(validateRequest, xmlType, xmlOutputStream, ctx);
    catch (Exception excp)
    excp.printStackTrace();
    // TODO - call service handler
    Document vcResp = docBuilder.newDocument();
    OutValidateConfigCodec vcResponseCodec = new OutValidateConfigCodec();
    XMLInputStream xmlInputStream = XMLInputStreamFactory.newInstance().newInputStream(vcResp);
    DeserializationContext dCtx= DeserializationContextFactory.newInstance().createDeserializationContext();
    vcResponseCodec.deserialize(xmlType, xmlInputStream, dCtx);
    } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    return null;
    There must be something I'm missing, because I'm sure there is a simple way to
    Marshall my object back to XML. Am I using the wrong API? Can someone please
    shed some light on this? Any insight or suggestions are much appreciated.
    Thank you,
    Matt

  • Oracle function and query return different results

    Hi, I am using oracle 10g database.
    Function is :
    create or replace FUNCTION FUNC_FAAL(myCode number,firstDate date
    *, secondDate date)*
    RETURN INTEGER as
    rtr integer;
    BEGIN
    select count() into rtr*
    from myschema.my_table tbl where tbl.myDateColumn between firstDate and
    secondDate and tbl.kkct is null and tbl.myNumberColumn  = myCode ;
    return (rtr);
    END FUNC_FAAL;
    This function returns 117177 as result.
    But if I run same query in the function seperately ;
    select count()*
    from myschema.my_table tbl
    where tbl.myDateColumn between firstDate and secondDate
    and tbl.kkct is null and tbl.myNumberColumn  = myCode ;
    I get different result 11344 (which is the right one).
    Table and function are in the same schema.
    What can be the problem ?
    Thanks.

    1. i think ur parameter name and Column names are same Firstdate and seconddate try to choose different name
    2. try using Trunc function around your dates
    where trunc(tbl.myDateColumn) between trunc(firstDate) and trunc(secondDate)then compare the result....sometimes time elements comes into play.
    Baig
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • Select statement returns different results from 9i and 10g

    Hi all,
    Would appreciate if someone could help to solve this puzzle here:
    I have the exact the statements running on Oracle 9i and 10g, why do they return different results?
    Select unique(GroupDesc) , GroupSeq from Module where ModuleId in (Select ModuleId from User_Access where UserId='admin') and Status='A'
    In Oracle 9i:
    Both columns returned as follows...
    GroupDesc | GroupSeq
    In Oracle 10g:
    Only one column returned, the column with unique keyword was missing...
    GroupSeq
    Could anyone enlighten me?

    yes, the table structure... actually the CREATE TABLE statement...
    with some sample data (INSERT INTO)
    and the actual queries (both of them - copy-paste them from each separate environment)
    you can use tags around the statements this will format it to a fixed font - making it easier to read
    Edited by: Alex Nuijten on Feb 20, 2009 10:05 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Bridge CS6 - Smart Collections Different Result Everytime

    I recently was using a Smart Collection to review selects and I would come up with different results as I openend and closed folders that were a part of Smart Collection file base. Its as if my files hadn't been correctlty indexed or were not being indexed until I opened a folder and selected a file to view.
    Is there a way to make sure my files are being indexed or is reseting the Prefs the only way to do this?

    You can either visit each folder and wait until the spinning arrow is finished indexing, which takes awhile.
    Another way is to do a search at the start of the directory (it searches down) and check include non-indexed files.  You can see what folder it is on in the lower left corner.  THis will take awhile also, but you can do the search when you are not using the computer and just let it run.  If you have to stop it before it is done, note where it is at and then start search there next time.

  • Since purchasing the Note 3 in October i have had nothing but issues. I went through all the steps and eventually I was sent a different phone, which was working for the most part until the recent upgrade. Now I am back to the old issues, no service, it a

    Since purchasing the Note 3 in October i have had nothing but issues. I went through all the steps and eventually I was sent a different phone, which was working for the most part until the recent upgrade. Now I am back to the old issues, no service, it actually says not moblie network available, when everyone else in my family has coverage and are on my plan with iphones. I am missing text messages and dropping calls left and right. This is unacceptable for the cost of this phone and my service. I have did a hard reset etc. What else can I do??

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • Retrieve XML,store as a file, update data in XML and insert back. Possible?

    Hello,
    I have XML records stored in the DB. Now I want to retrieve XML as a file to my local system, edit the data values for some element nodes, child nodes and re-insert that xml in its earlier place..
    Is this possible?
    If yes, can u pls tell me how to do it.
    I tried using WebDAV, but I guess it’s not working in my machine.
    Also, I don’t want to update the xml record directly using UPDATE command. I want to retrieve as a file, store in a local system, and then update that entry in the DB.
    Thanks in advance, and your help is appreciated.
    Regards,
    Athar

    Which database version are you using
    What is the output of lsnrctl status
    The easiest way to do this will be use WebDAV or FTP. However if not getting the data out as a file will require some coding work. Getting it back is fairly easy, use a bfile

  • How to edit bitmap which is imported in flash using xml and save the edited bitmap back to xml in flash.

    hi all
    It would be appreciated if any one let me know how to edit
    bitmap which is imported in flash using xml and save the edited
    bitmap back to xml in flash.
    Is it posible to save the bitmap data in flash?
    thanks in advance

    Yes you can... but like I said before you need to upload the
    data from the changes you make to a server.
    In terms of the solution... its unlikely that you'll find one
    specifically for your needs. You will have to learn whatever you
    don't know how already and maybe adapt some existing examples to
    your needs.
    To change the visual state of a movie clip... you just do all
    the regular things that you want to do to it using flash... scale,
    rotation, drawing API , textfields etc in actionscript. If you
    don't know how to how to do that stuff, then you need to learn that
    first. That's basic actionscript.
    You can capture the visual state of a movieclip using the
    BitmapData class. That includes a loaded jpeg. You can also
    manipulate bimatp data using the same class. You should read up on
    that if you don't know how to use it or check out the examples
    below for uploading info.
    For uploading to the server:
    Here's an as2 solution that took 15 secs to find using
    google:
    http://www.quasimondo.com/archives/000645.php
    If you're using as3, google search for "jpeg encoder as3" and
    look through that info. There are also historical answers in the
    forums here related to this type of thing that might help as
    well.

  • How to validate and transform large (180M) xml files

    Hi:
    I've been looking at various ways to do this with oracle and am getting a bit lost in the sea of documentation and different ways to go about this. I was hoping that something like the XMLParser class and XMLTransform would be smart enough to handle large files by using SAX when it has to but I'm getting "too many nodes" when trying to transform a really large file. I've gotten oraxsl to handle it if I pass in the proper memory parameters on the command line but a) this will still have limits and b) I was trying to do this in a stored procedure which (I think) means I'm looking at XMLParser?
    I've also seen documentation on something called "Scalable DOM" but I think that's only in 11g? So I'm thinking I have to write a (Java?) stored procedure to loop through the top elements of this XML file (select extract(...)) and transform each node?
    I have the XML, XSD, and XSLT all in clob columns. What's the easiest/quickest path within Oracle to validate the XML against the xsd and translate source XML with XSL?
    I'm using Oracle 10gR2 on RH Linux.
    Thanks.

    So I'm thinking I have to write a (Java?) stored procedure to loop through the top elements of this XML file (select extract(...)) and transform each node? Here's something I've written a while back when I hit the same restrictions ("too many nodes") on 10.2.0.4.
    It takes XMLType as input parameters (but it's easy to adapt for CLOB), and streams the transformed XML directly into a file :
    create or replace and compile java source named ora_xslt_util as
    import oracle.xml.parser.v2.*;
    import oracle.xdb.XMLType;
    import java.io.*;
    import org.w3c.dom.*;
    public class oraXSL
    private static XMLDocument getXMLDocument(XMLType xml) throws Exception
        XMLDocument doc = null;
        DOMParser parser  = new DOMParser();
        parser.setValidationMode(oracle.xml.parser.v2.XMLParser.NONVALIDATING);
        parser.setPreserveWhitespace(true);
        parser.parse(new StringReader(xml.getStringVal()));
        doc = parser.getDocument();
        return doc;
    public static void transform(XMLType doc, XMLType xsl, String filename) throws Exception
        OutputStream os = new FileOutputStream(filename);
        XMLDocument xmldoc = getXMLDocument(doc);
        XMLDocument xsldoc = getXMLDocument(xsl);
        XSLProcessor xsp = new XSLProcessor();
        XSLStylesheet xss = xsp.newXSLStylesheet(xsldoc);
        xsp.processXSL(xss, xmldoc, os);
        os.close();
    }and the PL/SQL wrapper (originally part of a package) :
    PROCEDURE processXSL (
       p_xmldoc IN XMLType
    , p_xsldoc IN XMLType
    , p_filename IN VARCHAR2
    IS
    LANGUAGE JAVA NAME 'oraXSL.transform(oracle.xdb.XMLType,oracle.xdb.XMLType,java.lang.String)'
    ;

  • Built FM DITABook (made FM binaries) -- how do I get back to XML?

    For FrameMaker 8 DITA.
    I gen'ed apparently "clean" binaries from DITA XML -- now how do I gen "clean" DITA XML from the binaries?
    BACKGROUND
    I created a bunch of DITA topic files as .xml, then assembled them in a DITA map file.
    Next, I used
    Build FM DITABook from DITA map file to export those XML files as a binary (or if you prefer, "classic") FrameMaker book containing a list of ".xml.fm" binary (a.k.a. "classic chapter") files.
    I then proceeded to edit those binary files, closely conforming to DITA tag structure to create a FrameMaker book and constituent binary topic files that validated and gen'ed without error.
    Finally, I used
    Save As to save those .fm chapter files as XML. (Actually, FM8 for some reason wants to export them as ".xml.xml" files...)
    THE PROBLEM
    When I save the .fm files as XML, FrameMaker reports an error the essence of which is "Root element different from DOCTYPE".
    FrameMaker also reports the same error if I open a given .xml file then Save the file back into itself.
    If I then re-open the file that contained the error, FrameMaker does not report an error. That is to say that it seems that Open-ing and Save-ing the XML file "cleans" the error out of the file.
    So, is there any way to go directly to "clean" XML without performing the intermediate Open/Save operation?
    Cheers & thanks,
    Riley

    Hello Mr. Van ****,
    you might try the following:
    Rather than having the topics in XML, combining them into a map and turning the map into FM, you could have a book with chapters (=structured .fm-files) and insert the XML topics by conref
    This is analogue to using text insets in non-structured files.
    The advantage of this is having the topics as .xml (=validation, granularity, reuse) and an FM book (=generated lists a.s.o) at the same time.
    If you need to be on the pure xml path, you might try out the "DITA-Services" of SYSTEC. This is a plugin pack that
    * adds static or dynamic files to a book according to a configuration file
    * sets variable values, text condition visibility status and PDF metadata information according to a configuration file
    * localizes formats, reference pages a.s.o semi-automatically.
    This way you could go from xml + map>FM-Book without Title, TOC a.s.o>FM-Book with Title, TOC and all other bells and whistles >PDF.
    Feel free to inquire at [email protected]
    With kind regards,
    Franz.
    [SYSTEC - the document processing company.]
    http://www.systec-gmbh.com/sites/toolbox.php
    http://www.systec-gmbh.com/sites/ditapack.php
    http://www.systec-gmbh.com/sites/3dpack.php
    |Schreiberhauer Str. 5 |D-90475 Nuernberg - Germany
    |Phone +49 911 998955-625 |Fax +49 911 998955-663
    |e-Mail [email protected] |Internet: www.systec-gmbh.com
    |Redaction, Translation: www.systec-td.de |ePublishing, Solutions: www.systec-it.de
    |CEO: Dipl.-Ing. (FH) Georg Eck, Dipl.-Btw. (FH) Manfred Papp
    |Amtsgericht Nürnberg HRB 9369
    |Umsatzsteuer-Identifikationsnummer DE 133560519

  • My Mac Book Pro was really slow at everything and would kick me out of my photos every time i got on them. now it won't even allow me to log on. i put my password in and the screen will flash white and go back to the login page. HELP please...

    My Mac Book Pro was really slow at everything and would kick me out of my photos every time i got on them. now it won't even allow me to log on. i put my password in and the screen will flash white and go back to the login page. HELP please...

    There is nothing wrong with your Dell, it will work fine with any MacbookPro. I have been using Dell displays for over 12 years with many different Mac models. I have two 21" Ultra Sharp displays working side by side to design a Keynote presentation right now.
    The issue your having is with the way Keynote  takes control of the video output to both displays, it sends the presentation signal to one and the presenter display to the other, this is set up in;
    Keynote preferences > Presenter display.
    If you want to show a wesite or another app on  either display,  use application switcher:
    press the the  command key on the keyboard, then the tab key; a row of applications will show what applications are running, choose which one you want to show. Use command  > tab to return to Keynote.

Maybe you are looking for