Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. fanningpj

    reverse host name resolution in JDK1.1

    I'm stuck with using JDK 1.1.7 and I want to get the fully qualified DNS name of the machine my JVM is running on. If I use the following code: java.net.InetAdress ia = java.net.InetAdress.getLocalHost(); String addr = ia.getHostName(); The addr is not qualified. Does any know of a way of doing...
  2. fanningpj

    SAX and CDATA

    Checked Xerces-J 2.0.0 and crimson 1.1.3 and chiph is correct. The property names I gave must be out of date. The correct names are: http://xml.org/sax/properties/lexical-handler http://xml.org/sax/properties/declaration-handler
  3. fanningpj

    SAX and CDATA

    The usual property name for the Lexical Handler is: "http://xml.org/sax/handlers/LexicalHandler" It depends on which parser you are using. Likewise, for the DeclHandler: "http://xml.org/sax/handlers/DeclHandler"
  4. fanningpj

    parsing an XML-document-which API is the best?

    The choice of XML representation depends on what you are doing. SAX is good if you are working with large documents because document models store the entire document in memory. Generally, a document model is easier to code for. JAXP can be used to invoke SAX and DOM. JDOM and dom4j are more...
  5. fanningpj

    XML Schema "What replaced PCDATA?"

    I'll repost the previous answer - I didn't preview my post before submitting it and the escape sequence examples were printed incorrectly. You should always use the escape sequence '&amp;' for ampersands in XML. Other characters that are usually escaped are: < &lt; > &gt; ' &apos; &quot; &quot...
  6. fanningpj

    XML Schema &quot;What replaced PCDATA?&quot;

    You should always use the escape sequence '&amp;' for ampersands in XML. Other characters that are usually escaped are: < &lt; > &gt; ' &apos; &quot; &quot; Alternatively, you can use CDATA. For example: <root> <![CDATA[ &><'&quot; ]]> </root>
  7. fanningpj

    create XML file from database on the fly.

    Further to what Mr. Tom said, JDOM have some samples of how to turn a JDBC ResultSet into a JDOM. The resulting JDOM can be output as XML using the org.jdom.output.XMLOutputter class. http://cvs.jdom.org/cgi-bin/viewcvs.cgi/jdom-contrib/samples/
  8. fanningpj

    JAXP TrAX: How to propogate SAXExceptions?

    I found the answer to my own query. The javax.xml.transform.Transformer now has a setErrorListener(...) method. Once an ErrorListener is attached to the Transformer object, any SAXExceptions thrown in my pipe will be passed on through the Transformer to the ErrorListener.
  9. fanningpj

    JAXP TrAX: How to propogate SAXExceptions?

    I have a system doing the following: SAX Pipe(input) -> SAXSource -> Xalan -> SAXResult -> SAX Pipe(output) If I get an exception in the SAX Pipe(output), I want to pass a SAXException back down the program stack. Xalan currently swallows my SAXExceptions. Does anyone know of a feature that I...
  10. fanningpj

    Very basic problem.

    When you include the DTD line, the XML parser will usually look for the file that is specified. If possible, leave out this line. Otherwise you have to conatact camelotherald.com and ask them to make the dtd file available over the web - it is currently not to be found in its specified location.
  11. fanningpj

    XSL: How to change element value into attribute value?

    I'm quite new to XSL and all the tutorials seem to be oriented towards XML -> HTML conversions - I want XML -> XML. I have something like: <name> <first>Joe</first> <last>Soap</last> </name> I want to convert this to: <name first=&quot;Joe&quot; last=&quot;Soap&quot;/> I've tried...

Part and Inventory Search

Back
Top