Building XML from Java

Hi,
I would like to know how to include DOC TYPE reference node, when building XML from Java.
Thanks !!

SetDocType is available only in JDOM parser. I would like to know is it prossible without that.
Thanks !!

Similar Messages

  • READING XML FROM JAVA

    I am developing web services based GIS, I have XML file which was generated from Geoserver. I dont know how to link Java with XML and query XML from Java. I need help pls.
    PAI

    there are apis to parse xml using java,
    http://www.cafeconleche.org/books/xmljava/chapters/ch09s06.html
    try this link..
    regards
    Shanu

  • How to call xml from java

    Hi
    I want to use xml for updating files in an existing jar . so i want to call xml from java code and then come back to java code and do the remaining work in java code, pl guide me how to do this . what APIs are helpful for this regard
    Thanks

    You can't update files in a jar. Even if you could, you wouldn't use XML for that. You don't call XML. XML is not a programming language. So, basically your entire question is misguided.

  • [svn:bz-4.x] 21287: Merge changes to qa-regress build. xml from changelist 20641 on branches/4.0.0_fixes to branches/4.x.

    Revision: 21287
    Revision: 21287
    Author:   [email protected]
    Date:     2011-05-23 07:37:28 -0700 (Mon, 23 May 2011)
    Log Message:
    Merge changes to qa-regress build.xml from changelist 20641 on branches/4.0.0_fixes to branches/4.x.
    Modified Paths:
        blazeds/branches/4.x/qa/apps/qa-regress/build.xml

    I chroot into workdir. uncommented en_US.UTF-8 in /etc/locale.gen, run locale-gen and now get this inside the chroot.
    [root@dArch2 releng]# chroot work/x86_64/root-image/
    [root@dArch2 /]# locale
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    this looks alright to me. Any more suggestions?
    It's the first time I use a custom-repo and I set it up only for this purpose. So yes, it's up to date and can be used outside the chroot. Also a different package I put from AUR into my custom-repo installs fine and doesn't give this error.
    How else could I test the custom-repo?

  • Why not all jars picked up by ojdeloy and how to generate build.xml from command line and not JDEV GUI - quick question

    Hi All
    We have 11.1.1.7 ojdeploy to compile our app.
    We notice in the log that not all jars are used in classpath arguments when we explicitly set them up for compilation.
    eg:
      <path id="classpath">
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/commons-el.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/jsp-el-api.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/oracle-el.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/a.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/b.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/c.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/d.jar"/>
    </path>
    Log Output -
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/bin/javac
    [ora:ojdeploy] -g
      [ora:ojdeploy] -Xlint:all
      [ora:ojdeploy] -Xlint:-cast
    [ora:ojdeploy] -Xlint:-empty
      [ora:ojdeploy] -Xlint:-fallthrough
      [ora:ojdeploy] -Xlint:-path
      [ora:ojdeploy] -Xlint:-serial
      [ora:ojdeploy] -Xlint:-unchecked
      [ora:ojdeploy] -source 1.6
      [ora:ojdeploy] -target 1.6
      [ora:ojdeploy] -verbose
      [ora:ojdeploy] -encoding Cp1252
      [ora:ojdeploy] -classpath
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/resources.jar:
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/rt.jar:
      [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/jsse.jar:
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/a.jar"/>
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/c.jar"/>
    1- Is it because it depends on how jpr or jws are configured ?
    2- How can we automatically generate a build file of the application from command-line (as opposed to using Jdev IDE to click to generate a build.xml) ?

    The first  warning is happening because you're stating drivers for input devices without need. You haven't disabled hotplug so evdev gets used instead of kbd. This is normal, and you should change the driver line from kbd to evdev so that whatever options (if any) you've specified for the keyboard get parsed.
    The second warning is about you not installing acpid.
    The third I have no idea about, but look at the synaptics wiki. None of the (WW) are related to your video card.
    And every card that has 2 or more output ports show up as "two cards". You also don't need to specify the pci port in xorg.conf. edit: this is the general case with laptops, might be different for desktops.
    When I do lspci -v I get:
    00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at dfe80000 (32-bit, non-prefetchable) [size=512K]
    I/O ports at d0f0 [size=8]
    Memory at c0000000 (32-bit, prefetchable) [size=256M]
    Memory at dff00000 (32-bit, non-prefetchable) [size=256K]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0
    Memory at dfe00000 (32-bit, non-prefetchable) [size=512K]
    Capabilities: <access denied>
    And it doesn't matter if it errs in trying to sli up with it self. That's just not a possibility.
    Last edited by gog (2009-10-15 23:59:49)

  • Running Ant file - build.xml from JDev

    hi all
    I have created simple BPEL project. I'm using JDev 10.1.3.1.0
    & SOA suite 10.1.3.1.0 . If I deploy my BPEL process using deployment utility
    of JDev then it gets deployed well on localhost:8888 .
    But If I run build.xml Ant file from JDev then it complies properly but it tries to deploy on[b] localhost:9700. If I run same Ant file from Developer prompt then it again BPEL gets deployed properly on localhost:8888.
    It means JDev is overwriting some properties values.
    Does any one aware of this.?
    thanks
    /patel

    Hi Patel,
    Have a look here:
    http://www.it-eye.nl/weblog/2007/02/16/customizing-bpel-process-deployement-with-ant-165-in-jdeveloper/
    Maybe it will helpp you out!
    Regards,
    Tom

  • Building XML from relational data

    I need to create XML documents from relational data that conforms to an XML schema document. We need to store and query the XML documents we create.
    Therefore, we have decided to store the XML using the object model rather than as a CLOB
    i.e. register the schema with the XML DB which in turn creates the tables and object types that represent the schema.
    What is the best way build the XML document from the relational data ??
    Can I pass the relational data to the default constructors of the object types created by the schema registration ?? (and then create an XML document from the top level object instance using SYS_XMLGEN)
    Or should I build the xml from strings using XMLELEMENT,XMLFOREST built-in's when retrieving the data from the relational tables ?? OR use the XMLDOM package to build the document ??
    Would appreciate any advice on the best approach.

    There are basically two ways to join your document fragments with SQLX:
    1/. With xmlForest
    e.g. SELECT XMLELEMENT ( "Emp",XMLForest(e.employee_id, e.lname, e.salary)) AS "result"
    FROM employees e WHERE employee_id > 1500 ;
    result
    <Emp>
    < employee_id >1769</ employee_id >
    < lname >Smith</ lname >
    < salary >200000</ salary >
    </Emp>
    2/. With nested invocations of xmlElement
    e.g. SELECT XMLELEMENT("Emp", XMLELEMENT("name", e.fname ||' '|| e.lname),
    XMLELEMENT ( "hiredate", e.hire)) AS "result"
    FROM employees e WHERE employee_id > 200 ;
    result
    <Emp>
    <name>John Smith</name>
    <hiredate>2000-05-24</hiredate>
    </Emp>
    <Emp>
    <name>Mary Martin</name>
    <hiredate>1996-02-01</hiredate>
    </Emp>

  • Creating XML from java Code

    Hello @ll,
    I need a java code to convert XML file ,which has one node to again a XML file with multiple nodes,depends on the content of source XML File....
    The source structure is something like this:
    <Name>abcd;xyzw;prs</Name>
    and the target structure is something like:
    <FirstNAme>abcd</FirstNAme>
    <MidNAme>xyzw</MidName>
    <LastName>prs</LastName>
    the length of the data is not fixed. and ";" is used as a seperator.
    I have hundred such nodes on the target side.
    How do i acheive this
    Thanks in Advance.
    With Regards,
    BVS

    DEVELOPEMENT-THRILL wrote:
    hi ,
    what i think he can convert the xml to java object by using xstream then he can do his desired work in java and again he can convert it to xml by using xstream again.
    RegardsAn enormous waste of time, though. His "desired" work doesn't need any Java at all, beyond maybe kicking off the transform. Seriously, you've given some poor advice - as we all do from time to time - just accept it rather than try to justify it in retrospect. One of the biggest mistakes you can make as a developer is to use the same tool for everything simply because you already know how to. XSLT and XPath are enormously useful tools to have kicking about, and pretty trivial to learn as well. What could take dozens of lines of Java to achieve could take a single XPath query. Which would you prefer?

  • Can ant call a target from my build.xml from another xml file?

    can ant have a target something like this:
    <target mytarget>
    <antcall file="C:\app\build2.xml" targetname="blah">
    </target>
    Is it possible to call a target in my build.xml that will then look in a file called build2.xml and call a target in that xml file?
    Thanks,
    Tad

    I looked at the manual and the site and couldn't find anything, you don't have to tell me the exact xml if
    it bugs you, all I want to know is if it is possible and if it is what task should I use, I will look up
    the attributes and how to do it.Now this really takes the biscuit.
    I gave you a very specific link to the document that tells you which task to use and which arguments to set. Did you check that link? If so, what else do you want? If not, why not?

  • Need some help how to generate xml from java bean.

    Hi,
    Can some one help me how to generate the xml format output from a java bean.
    The bean contains around 15 to 20 attribute values.
    Thanks in Advance.
    sarayu

    You can use XMLEncoder with custom persistence delegates if needed:
    http://java.sun.com/products/jfc/tsc/articles/persistence4/

  • Building XML from fragments

    Here's my scenario:
    I have multiple PL/SQL stored functions that return REF CURSORs. Each REF CURSOR contains information to build a portion of an XML document. I want to assemble these XML "fragments" into a DOM object, then apply a stylesheet to the entire object before saving it to a table.
    All of this will be done in Java, and I need to make it efficient (in terms of speed and memory) since the XML document may grow to be very large. What is the best way to go about doing this?
    Right now, I'm able to call getXMLDOM() which returns a complete XML document for each fragment, but what should I do with it now? Does anyone have any suggestions on what my next step should be?

    SetDocType is available only in JDOM parser. I would like to know is it prossible without that.
    Thanks !!

  • Passing XML from Java to PL/SQL using CLOBs?

    Hi. Here at the University at Buffalo, we're trying to develop an architecture where departments can send XML transactions to the business offices over HTTP. Since we don't have much Java expertise on staff, the boss has decided that we should use PL/SQL wherever possible. To that end, I have a Java servlet that calls PL/SQL stored procedures using JDBC.
    My question is this: We anticipate that we will have the need to process documents larger than the limit on VARCHAR2 data. However, unless I am misunderstanding the documentation on working with LOBs, the LOB itself must already exist in the tablespace. How will I take the XML document I receive through the servlet and pass it through to the PL/SQL function which accepts it? This function, FYI, routes documents to various systems based on document type, checks user security, and does a bunch of other things before the XML document is committed to a table.
    Is this possible? If there are already resources available that answer my question, can you point me in the right direction?
    Thanks in advance,
    Craig Drabik
    Lead Programmer/Analyst
    SUNY at Buffalo
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Craig Drabik ([email protected]):
    Hi. Here at the University at Buffalo, we're trying to develop an architecture where departments can send XML transactions to the business offices over HTTP. Since we don't have much Java expertise on staff, the boss has decided that we should use PL/SQL wherever possible. To that end, I have a Java servlet that calls PL/SQL stored procedures using JDBC.
    My question is this: We anticipate that we will have the need to process documents larger than the limit on VARCHAR2 data. However, unless I am misunderstanding the documentation on working with LOBs, the LOB itself must already exist in the tablespace. How will I take the XML document I receive through the servlet and pass it through to the PL/SQL function which accepts it? This function, FYI, routes documents to various systems based on document type, checks user security, and does a bunch of other things before the XML document is committed to a table.
    Is this possible? If there are already resources available that answer my question, can you point me in the right direction?
    Thanks in advance,
    Craig Drabik
    Lead Programmer/Analyst
    SUNY at Buffalo<HR></BLOCKQUOTE>
    You has to use temporary CLOB for this purpose.
    If you needs some kind of examples I'll sent to you directly the codes.
    Best regards, Marcelo.
    null

  • Writing XML from java and import this into OpenOffice

    Hello , i'd like to write a XML file which covers Text and Images and can be imported into OpenOffice. The Export to XML already works. But i don't know what XSL or other files a necessary ? Does anyone have a converter ? Or can gibe a clue ?

    dunno if it is feasable with only an XML file.
    i am doing this by generating an SXW file (OpenOffice) using JAXP for the XML content and java.util.zip to pack the XML and the images in the SXW.

  • Reading Xml from Java--urgent

    Hello
    I nead thyis realy very urgen.I have XmlParser and xml.jar.
    I unpacked xml.jar. When I tried to compile xmp\lparser i got 10 errors.
    He can't find packages(w3c,dom).
    What to do?
    If you know adress where i can find api for Xml it would be great help.
    I nead very simlpe thing to read value of 2 nodes whish are always there asme and iI am very new in XML.
    I have to finish my graduation project tonight (i ma writeing jsp aplication).
    thank you a lot for any help.

    Take a look at Xerces at xml.apache.org.
    Alan Yackel

  • Reg XML generation from java objects using SAX 2.0

    i'm using java 1.6 and i've imported following class to generate XML from java objects
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    the following class has been imple her to create a Xml file and tag elements ,
    OutputFormat of = new OutputFormat("XML", "iso-8859-1", true);
    XMLSerializer serializer = new XMLSerializer(fos, of);
    ContentHandler hd = serializer.asContentHandler();
    hd.startDocument();
    everything works fine but i'm getting warrnin reg the serializer and outputformat
    warring is:
    com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release
    com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release
    HOW CAN I AVOID DS WARRING PLZ HELP REG DS
    thanks ,
    with regards,
    Rajesh.S

    I've been having the same problem. Here is what i found:
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476630]
    Hope that helps (or at least helps you feel better).

Maybe you are looking for