Naive xml question

hi,
i'm new to xml and i need to create a data base in xml which is supposed to store patient records.
The question is:
Should all patient records be stored in the same file or should each patient record be stored in a different file?
In the latter case how do we search for records given (for instance) the patient's name?
Thanks,
Nikolas.

Hi pete,
I see you know alot on the subject, what exaclty does your job entail? Does your company do any summer interships :-) ? Mehti & I are undergraduates in our second year of computer science at University College London and have been assigned this group project. Part of it involves making an xml "database" to store patient records for a phoney hospital system. From the requirements it would seem that an archive system would be preferable:
Users, after identifying themselves, would retrieve files from the archive, edit them & replace them...
In that respect, this isn't actually a relational database at all!
>If you absolutely
absolutely must only use XML, then you can create the
index as an RDF/XML file and so query that. Since the
records are simple files on the file system you may
have more work to guarentee data integrity and
security.
This seems like what we would want to do. However what does an RDF/XML file look like? It indexes the paths to the files on the system right?
> A compromise might be to use a CVS behind a web
server to manage the access to the records- you can
then fire a trigger on any updates to the record and
re-index as required, and the interface is more
secure.
I personally don't have much experience with CVS (I do however have an idea about what it's about). However as it would definetly garantee the integrity of the file system we will try learning about it and find out how we could implement it.
I think for the moment, we will satisfy ourselves with a repository of patient records as separate files and try to garantee security and integrity of the file system through CVS.
Thanks Pete,
Nikolas.

Similar Messages

  • Where to ask XML-questions

    Hello,
    when I have a question about XML, where do I ask?
    XML DB issues related to XML DB
    XML  space for the following subspaces
    General XML  Discussion of the general XML language, standards (XSLT, XQuery, XMLSchema, etc.) and application management issues, suggestions and tips.
    PL/SQL XML Programming  PL/SQL programming using XDK and related management issues inside Oracle database server. Any question for XML DB functionality, please post your question in Products -> Database-> XML DB.
    XQuery Discussion of Oracle XQuery Technology Preview, W3C XQuery specifications, and JSR 225: XQuery API for Java (XQJ) issues
    I think I now have an idea (not that I'm sure about it) where my question will fit best. Now, because there is an explanation of the scope of the space, I don't remember something like this in the old forum. Nevertheless it might be confusing for a new member or one that lacks a certain knowledge about the subtleties:
    One step forward everyone who understands the explanation for the PL/SQL XML Programming space!
    When I have a question about XQuery, how can I decide whether XQuery is correct or General XML?
    Which questions qualify for XML DB and not for any of the others.
    We all know that many users are not able to see that SQL questions don't belong into the SQL Developer space, how can we expect that they will find the "correct" forum for XML questions? In the end they will end up in the SQL and PL/SQL space anyhow :-)
    Regards
    Marcus

    My $0.02.
    As I recall, the explanation for each forum was at the entry level for each forum and not displayed within the forum itself.
    The PL/SQL XML Programming space refers to the Oracle XML Developer Kit.  It is maintained by a different team than the XMLDB so the need for a separate space for it makes sense.  That said, what it covers is also part General XML and XQuery if you dig into what you can do in the XDK.
    Some questions that would qualify for the XML DB space.
    Anything related to schema registration or downstream of schema registration.  Such as querying/performance/indexes/etc.
    Issues parsing XML via using XMLTable (or XQuery, such as the new XQuery update added in 11.2.0.3) (Yes that can conflict)
    Storage of data in XMLType columns
    I to have always been a bit unclear on the exact division between groups in this XML space.  I see the XQuery space as being a subset of the General XML space.  I watch all three forums, as they are normally low volume and you never know where a question will pop up.  As you have seen, questions often end up in the wrong forum and often General XML gets an influx of questions that should go into the Business Intelligence space as well.  There is no good way right now to start a generic post and let the system suggest forums that the post could go into, based on content or software involved.  That would be a nice touch for the future.

  • Follow-up Basic XML Questions

    First, I apologize to the board in advance because I started a very similar topic already. I know this can be annoying but I think I'm worried that people will ignore my original post because there was already a reply to it. I added 2 follow up posts and nobody has responded. It could well be because they feel that my questions were already answered. After reading and re-reading the person who replied to my original question I did start to pick up many answers from his post. However, I guess I have some follow-up questions and felt compelled to start a new thread to get this "out there" again. I promise to try not to do this again and, once again, I apologize for starting multiple similar topics. Anyway, here goes my follow-up questions...
    I'm pretty new to XML but I've been reading an article on msdn about it and listed some code from the article at the bottom of this post.
    I have some questions about namespaces. From what I understand, a namespace is a unique identifier (it's a string). The thing that's bugging me though is this line...
    <x:transform version='1.0' xmlns:x='http://www.w3.org/1999/XSL/Transform'>
    Maybe I'm wrong, but my gut feeling is that this particular namespace has a special meaning (in other words, it goes beyond being just a unique identifier). Am I correct on this?
    From other stuff I've read I have another gut feeling that there are certain namespaces that somehow have schemas attached to them automatically. I've read that a schema can be "namespace aware". So, as a guess at the answer to my original question - are there certain namespaces that are something like "keywords" (similar to the concept of "keywords" in programming languages)? And is the "big deal" about these particular namespaces that they have schema definitions attached to them somehow? Any help would be GREATLY appreciated!
    EXAMPLE CODE FROM THE MSDN SITE:
    <x:transform version='1.0'
    xmlns:x='http://www.w3.org/1999/XSL/Transform'
    >
    <x:template match='/'>
    <hello_world/>
    </x:template>
    </x:transform>

    this particular namespace has a special meaning .... Am I correct on this?Yes, that namespace has a "meaning", but only to a program that implements the XSLT language. Likewise a "purchase order" namespace has a "meaning", but only to a program that is designed to read XML with that namespace and convert it to purchase orders in somebody's accounting system. (Just as the codes 'A', 'C', and 'D' could mean 'Add', 'Change', and 'Delete' to a program that maintains a database.) Similarly element names have a "meaning", but only to a program that is designed to understand that "meaning". A Java program has a "meaning" but a COBOL compiler doesn't understand that "meaning".
    From other stuff I've read I have another gut feeling that there are certain namespaces that somehow have schemas attached to them automatically.Not that I've ever heard of.

  • XSLT, XML Question???

    I've recently found that I can use XSLT to transform XML docs into SQL using x-path... Is there any documentation out there referencing a transformation using x-query???? I've searched the web but have not seem much on this...
    Any direction would be greatly appreciated.

    XSLT doesn't use XQuery. So it's not surprising you haven't found much documentation about using XQuery in XSLT. You might want to direct questions like this one to an XSLT forum rather than a Java forum.

  • XMLTYPE variable converting to XML (Question)

    Friends,
    I am stuck on an error and cannot find a way out. Please help. I know it's a long question but a very simple answer to many smart people here. I am just lost and need your help. (I am new to SOA so bear with me)
    I have a BPEL process which invokes a PL/SQL API which returns the XMLTYPE output which has the XML data. In order to convert the XMLTYPE to normal XML I do following :-
    - I added a Java embed activity in BPEL with following code (Invoke_new_get_customer_order_info_OutputVariable','OutputParameters','/ns2:OutputParameters/ns2:X_CUSTOMER_ORDER_INFO_XML is the XMLTYPE)
    (responsePayoad is string variable)
    try{                                                           
    Node node = (Node)getVariableData("Invoke_new_get_customer_order_info_OutputVariable','OutputParameters','/ns2:OutputParameters/ns2:X_CUSTOMER_ORDER_INFO_XML");
    Node childNode = (Node) node.getFirstChild();
    StringWriter writer = new StringWriter();
    Transformer transformer = TransformerFactory.newInstance().newTransformer();
    transformer.transform(new DOMSource(childNode), new StreamResult(writer));
    String xml = writer.toString();
    String nsXML = xml.replaceFirst("<FetchCustomerInfoResponse","<FetchCustomerInfoResponse xmlns=\"http://xmlns.djoglobal.com/OrderTracking/CustomerInfo\" ");
    setVariableData("responsePayload",nsXML);
    addAuditTrailEntry("XML with Namespace: " + nsXML);
    } catch(Exception e){                            
    addAuditTrailEntry(e);
    System.out.println("Namespace injection failed due to : " + e);
    After above I have ASSIGN activity where I use parsexml function on the "responsePayload" variable to assign to a variable of type element which refers to following xsd. This is where I get an "internal xpath error" during runtime which I cannot resolve.
    XSD of the element variable refering to "FetchCustomerInfoResponse" element
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://xmlns.djoglobal.com/OrderTracking/DJOFetchCustomerOrderInfo"
    elementFormDefault="qualified">
    <xsd:element name="FetchCustomerInfoResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="DJO_ONT_ACCOUNT_ORDERS">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="DJO_ONT_ACCOUNT_ORDER" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:attribute name="ordered_date" type="xsd:string"/>
    <xsd:attribute name="cust_po_number" type="xsd:string"/>
    <xsd:attribute name="order_number" type="xsd:integer"/>
    <xsd:attribute name="header_id" type="xsd:integer"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    XML returned in the XMLTYPE from the PL/SQL API :-
    <Invoke_new_get_customer_order_info_OutputVariable><part name="OutputParameters" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XXDJO_ONT_ORDER_TRACKING_WS/GET_CUSTOMER_ORDER_INFO_XML/"><X_CUSTOMER_ORDER_INFO_XML>
    <FetchCustomerInfoResponse xmlns="">
    <DJO_ONT_ACCOUNT_ORDERS>
    <DJO_ONT_ACCOUNT_ORDER ordered_date="24-APR-12" cust_po_number="PO1" order_number="123456" header_id="7777777"/>
    <DJO_ONT_ACCOUNT_ORDER ordered_date="19-APR-12" cust_po_number="PO2" order_number="4545454" header_id="888888"/>
    <DJO_ONT_ACCOUNT_ORDER ordered_date="09-APR-12" cust_po_number="PO3" order_number="56565656" header_id="999999"/>
    </FetchCustomerInfoResponse>
    </X_CUSTOMER_ORDER_INFO_XML>
    </OutputParameters></part></Invoke_new_get_customer_order_info_OutputVariable></messages>
    Any help is greatly appreciated as this is driving me nuts.
    Thanks

    Few modifications,
    1. Initialize your int count to 0, int count=0;
    2. Write count++; as the first statement in your for loop. 3. Remove count++; at the bottom.
    4. Add a hidden field to your form (after submit button, but before your </form> tag)
    <input type="hidden" name="qCount" value="<%=count%>">
    Now use this code,
    writeXML.jsp
    <%
    int qCount = Integer.parseInt(request.getParameter("qCount"));
    String home ="C:\\Tomcat\\FYProject\\lib\\";
    String filename = request.getParameter("file");
    String extension = ".xml";
    String filePath = home + filename + extension;
    BufferedWriter bw = new BufferedWriter(new FileWriter(filePath,true));
    bw.write("<mc_QuestionType>");
    bw.newLine();
    for(int count=0;count<qCount;count++) {
         String Tquestion = request.getParameter("questionText"+count);
         String answer1 = request.getParameter("choice_1"+count);
         String answer2 = request.getParameter("choice_2"+count);
         String answer3 = request.getParameter("choice_3"+count);
         String answer4 = request.getParameter("choice_4"+count);
         String Canswer = request.getParameter("cAnswer"+count);
         bw.write(" <questionText>" Tquestion "</questionText>");
         bw.newLine();
         bw.write(" <choice>" answer1 "</choice>");
         bw.newLine();
         bw.write(" <choice>" answer2 "</choice>");
         bw.newLine();
         bw.write(" <choice>" answer3 "</choice>");
         bw.newLine();
         bw.write(" <choice>" answer4 "</choice><br>");
         bw.newLine();
         bw.newLine();
         bw.write(" <answer>" Canswer "</answer>");
         bw.newLine();
         bw.write("</mc_QuestionType>");
         bw.close();
    %>Hope this works.
    Sudha

  • Sun-faces-config.xml question

    Hello all,
    maybe this question is a bit silly, but i�m a newbie to this. I�m developing a complib file with a custom component; and I want to add custom properties to it. As far as I�ve done, i�m able to add custom string properties via the "StringPropertyEditor"
    All this is done in the sun-faces-config.xml file, and when I declare a property which can be set via a combo-box, this is, with a "SelectOneDomainEditor" in the sun-faces-config.xml, I don�t know how to populate this combo with data to be shown so it can be selected in the properties window.
    I�d be truly grateful to anyone who can help me out, maybe a short sample or fraction of a sun-faces-config would be fine.
    Thanks everyone in advance, and sorry for the long read,
    MANUEL ANS�N.

    Hi ,
    The follwing link may probably answer your query.
    http://swforum.sun.com/jive/thread.jspa?threadID=50215&tstart=15
    Regards.,

  • PMW - XML question

    Hello folks,
    we are currently working on the creation of an XML based payment medium.
    As far as I can see, the tags are generated automatically:
    <tag>content</tag>
    My question, I need to adapt the <tag> names as follows:
    <tag somefilename="xxxx.xml"></tag>
    I have the following problems: The file name should be automatically generated via document number or identifier (i.e. "1900000054.xml") which is changing for every transaction. Therefore, I need to have some sort of variable within the tag name. But it doesn't even allow me to enter a space within the name, so I guess I have to flag that tag differently.
    Is that at all possible? Otherwise we would need to switch back to a plain flat file and that's not a very nice solution.
    Many Thanks in advance for help/advice,
    Thomas

    Hello Thomas,
    what you are describing looks like an Attribute. Try to create an Attribute "Filename" under your Element "Tag". For the "Filename" you can then define any source again.
    Regards,
    Anton.

  • Spry XML question

    can spry read in XML as a string? I have an xml page
    generated by a coldfusion query (.cfm) The page parses correctly as
    an XML file, but when spry reads it in, it does not read it as XML.
    I can save the .cfm results (view source) as an XML file and it
    views perfectly through spry. Wondering if there is a way to do
    this with the original cfm file. NOTE: the example linked
    here
    does not work

    I use CF to generate XML all the time.
    You have to make sure you set the content-type to XML and
    make sure to remove whitespace:
    http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
    But to answer your questions: yes, Spry can read XML strings:
    http://labs.adobe.com/technologies/spry/samples/data_region/XMLStringSample.html
    Hope this helps.
    Don

  • Spry Repeat/XML question

    I am in desperate need of help.
    Here is the path to my html file.
    http://www.3hounddesign.com/WoodsWoods/gallery/index.html
    When you look at it, you see the navigation list on the left
    (Adobe, SF Symphony, Fiery, etc). This list corresponds to the
    images that you see. However some of the navigation items (Adobe,
    Apple, Levi Strauss) have more than one image associated with them.
    I want to be able to use the arrows at the bottom of the page to
    click through to the second image, but not have it show up on the
    navigation list. For example, I only want Adobe to show up once on
    the navigation list, even though I have 2 different adobe photos,
    and thus have created 2 different XML entries for Adobe.
    http://www.3hounddesign.com/WoodsWoods/gallery/galleries/woods/photos.xml
    The first entry has the Adobe title, while I left the second
    one blank. However this leaves a blank space on the navigation
    list.
    Unfortunately I know very little about javascript and am just
    learning about this spry stuff and am very confused, and therefore
    created this stuff by altering the adobe gallery demo
    I also have a version I created by altering the adobe
    products demo (
    http://www.3hounddesign.com/Paul_Woods/identity.html#)
    However that has problems of its own, so I would rather stick
    with my alteration of the gallery demo.
    So basically my question...Is there any way that I can have
    the navigation only show one entry for Adobe (and Apple and Levi)
    yet still have two images there?
    Sadly, I am desperate need of an answer ASAP, as a current
    job I am working on depends on it, and I don’t want to have
    to resort to iframes.
    Please please someone help me!

    Hi,
    I looked over you code and I noticed that you have the image
    src added on the left side.
    You have this <img
    src="galleries/{dsGalleries::@base}{dsGallery::thumbnail/@base}{@thumbpath}"
    alt="{@thumbpath}" name="tn{ds_RowID}" width="89" height="15"
    id="tn{ds_RowID}" style="left: -77px; right: 0px;" />
    You don't need to have the image added on the left side,
    because you want there only the title (Adobe, SF Symphony...)
    So you should replace the img with a div for example:
    <div style="width:89px; height:15px;left: -77px; right:
    0px;" id="tn{ds_RowID}" >{@thumbpath}</div>
    The reason why you have an empty space after Adobe item is
    that on you xml you have an empty alt attribute.
    To display only the thumbpaths that are not empty you can add
    an spry:if condition.
    So the above div becomes:
    <div style="width:89px; height:15px;left: -77px; right:
    0px;" id="tn{ds_RowID}" spry:if="{@thumbpath}" != ""
    >{@thumbpath}</div>
    This says if thumbpath is not empty display it.
    I aslo load you page in IE and I noticed that the left menu
    is not displayed.
    Diana

  • Very basic SQL/XML question

    I'm using the following environment:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    However, I don't think my environment is the issue.
    I'm trying to get output which looks like this from a simple table:
    <MAXDOMAIN action="S">
         <DOMAINID key="true">domainid_data</DOMAINID>
         <SYNONYMDOMAIN type="relationship" action="AU" >
              <VALUE key="true">value_data</VALUE>
              <MAXVALUE>maxvalue_data</MAXVALUE>
              <DESCRIPTION>description_data</DESCRIPTION>
              <DEFAULTS>defaults_data</DEFAULTS>
         </SYNONYMDOMAIN>
    </MAXDOMAIN>The table looks like this
    Name                           Null     Type          
    DOMAINID                       NOT NULL VARCHAR2(30)   
    DESCRIPTION                             VARCHAR2(50)   
    DOMAINTYPE                              VARCHAR2(5)    
    MAXTYPE                                 VARCHAR2(5)    
    LENGTH                                  VARCHAR2(5) The real question is how do I get an element with attributes to also have content.
    <DOMAINID key="true">domainid_data</DOMAINID>and
    <VALUE key="true">value_data</VALUE>I'm not sure if I'm syntactically challenged or just not using the correct tags.
    If I try to just generate the first two tags, forgetting the following nesting, I'm OK, as long as I don't try to assign attributes to the DOMAINID tag:
    SELECT  XMLELEMENT
    ("MAXDOMAIN",XMLATTRIBUTES('S' AS "action"),XMLELEMENT(NAME DOMAINID, "DOMAINID")
    AS "RESULT"
    FROM FAC_MAXDOMAIN;This works and is pretty trivial.
    <MAXDOMAIN action="S"><DOMAINID>AIRFLOWTYPE</DOMAINID></MAXDOMAIN>
    etc, etc...However, this:
    SELECT  XMLELEMENT
    ("MAXDOMAIN",XMLATTRIBUTES('S' AS "action"),XMLELEMENT(NAME DOMAINID, "DOMAINID",XMLATTRIBUTES('true' AS "key"))
    AS "RESULT"
    FROM FAC_MAXDOMAIN;Yields an ORA-00907: missing right parenthesis error.
    Any ideas? maybe a good primer on SQL/XML might be the best solution...
    TIA,
    Paolo

    Very nice for a first post in terms of data included and formatting.
    It took me a few minutes to see it, but the simple answer is you are putting the XMLAttributes in the wrong location. See the XMLElement spec at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions220.htm#SQLRF06168 that shows XMLAttributes comes between the identifier and value. So that means you should have written it as
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
    SQL> WITH FAC_MAXDOMAIN AS
      2  (SELECT 'domainid_data' domainid, 'dscr' description,
      3          'type' domaintype, '10' maxtype, '5' length
      4     FROM dual)
      5  -- Using WITH so didn't have to create your table locally
      6  SELECT  XMLELEMENT("MAXDOMAIN",
      7            XMLATTRIBUTES('S' AS "action"),
      8            XMLELEMENT(NAME DOMAINID, XMLATTRIBUTES('true' AS "key"), "DOMAINID")
      9          )
    10  AS "RESULT"
    11  FROM FAC_MAXDOMAIN;
    RESULT
    <MAXDOMAIN action="S"><DOMAINID key="true">domainid_data</DOMAINID></MAXDOMAIN>

  • Simpe XML question.  You can make yourself look smart!

    I have the following xml file:
    <?xml version="1.0"?>
    <ToolConfig>
         <database_info></database_info>
         <spelling_info></spelling_info>
         <server_info></server_info>
         <concept_list></concept_list>
    </ToolConfig>I have the following java program:
    import java.io.*;
    import org.w3c.dom.*;
    import org.apache.xerces.parsers.DOMParser;
    import org.xml.sax.SAXException;
    public class ConfigParams
        public ConfigParams()
            String configFile = new String("C:\\tomcat\\webapps\\QueryTool\\WEB-INF\\ToolConfig.xml");
            try
                DOMParser parser = new DOMParser();
                parser.parse(configFile);
                org.w3c.dom.Document configDoc = parser.getDocument();
                NodeList nodeList = configDoc.getChildNodes();
                for (int j=0; j<nodeList.getLength(); j++)
                    System.err.println(j+": "+nodeList.item(j).getLocalName());
                System.err.println("-----");
                Node topNode = nodeList.item(0);
                NodeList sectionNodes = topNode.getChildNodes();
                for (int j=0; j<sectionNodes.getLength(); j++)
                    System.err.println(j+": "+sectionNodes.item(j).getLocalName());
                System.err.println("-----");
            catch (SAXException se)
                System.err.println("SAX EXCEPTION");
                se.printStackTrace();
            catch (IOException ioe)
                System.err.println("IO EXCEPTION");
                ioe.printStackTrace();
        public static void main(String[] args)
            ConfigParams cp = new ConfigParams();
    }The program outputs the following:
    0: ToolConfig
    0: null
    1: database_info
    2: null
    3: spelling_info
    4: null
    5: server_info
    6: null
    7: concept_list
    8: null
    -----My question is: Why does it find nine child nodes when I only have four child nodes in the XML file? Why is every other child node null?
    Thanks,
    Jon

    Thanks. That was helpful. I changed the getLocalName() call to getNodeName() and now it makes more sense. I do have another question, though: what is a local node name? What is a qualified node name?
    Thanks,
    Jon
    P.S. Or maybe I should just go Read The Fine Manual.

  • XML question on textnode null value

    Hi,
    I don't known XML use, I'm learning.
    My question is
    If in the DomDocument newsXML I append to "node" the newelement and a textnode, initially with not null value. Why, then, can't I setNodeValue to Null?
    newelement:=xmldom.createelement(newsXML,element_name);
    newnode:=xmldom.appendchild(node,xmldom.MAKENODE(newelement));     
    Textitem:=xmldom.createTextNode(newsXML,value);
    newnode:=xmldom.appendchild(newnode,xmldom.MAKENODE(Textitem));
    xmldom.setNodeValue(newnode,null); not possible!!!
    Why?
    Yet,
    is There another way to append a leaf null in the tree of xml?
    Thanks!

    I maybe wrong about this because my XML is a little rusty, but I thing a Node is null when we create it. It is only by adding a TextNode to it that we make it not null.
    If that's the wrong answer I will just suggest you visit one of the OTN XML forums which you can find here.
    Cheers, APC

  • AJAX-XML question

    Hi everybody,
    I don�t know if this is the right place for this question:
    I�ve followed this example:
    https://bpcatalog.dev.java.net/nonav/ajax/autocomplete/design.html
    it works great, but I have one question about it
    when the xml is generated:
    sb.append("<employee>");
    sb.append("<id>" + e.getId() + "</id>");
    sb.append("<firstName>" + e.getFirstName() + "</firstName>");
    sb.append("<lastName>" + e.getLastName() + "</lastName>");
    sb.append("</employee>");
    it doesn�t work for IE if any of those attributes has
    strange characteres like: ���� (spanish characters)
    (it doesn�t work for IE, for firefox it does)
    I need those characters in my XML.
    For example, I need something like:
    <employee>
    <id>23</id>
    <firstName>Jos�</firstName>
    <lastName>G�mez</lastName>
    </id>
    </employee>
    does anybody know how can I do this?, any idea?
    thanks for your time

    it doesn�t work for me
                   sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                   sb.append("<provincias><provincia><nombre>");
                   sb.append("Alcal�");
                   sb.append("</nombre><id>3324</id></provincia></provincias>");          
                   byte byteContent[] = sb.toString().getBytes("UTF-8");
                   response.getWriter().write(new String(byteContent,"UTF-8"));
    thanks

  • XML Question for web.xml file for LiteWebServer

    Hi,
    I have no clue of wut tags are required in the web.xml file.
    Currently the following code is in my web.xml file and i am trying to run servlets that are located under web-inf/*.class
    Pls tell me wuts wrong....
    Do i need those mime-mapping tags, session and welcome tags.......... ?
    Right now i just want those 2 servlets to work
    And wut is this encoding ="UTF-8" in the first line of the xml file. Wut does that do... ? ARe there any others
    Any help would b greatly appreciated
    Thanks
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="WebApp_1">
    <display-name>PDMPortal</display-name>
    <session-config id="SessionConfig_1">
    <session-timeout>60</session-timeout>
    </session-config>
    <mime-mapping id="MimeMapping_1">
    <extension>htc</extension>
    <mime-type>text/x-component</mime-type>
    </mime-mapping>
    <welcome-file-list id="WelcomeFileList_1">
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>HelloWorldExample</servlet-name>
    <servlet-class>HelloWorldExample</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>HelloWorld</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>HelloWorldExample</servlet-name>
    <url-pattern>HelloWorldExample</url-pattern>
    </servlet-mapping>
    </web-app>

    Try putting your servlets in the WEB-INF\classes directory.

  • UCCX 9.0(2) XML question

    I'm teaching myself about SOAP and XML responses for an upcoming project for a self-service application. We have UCCE/ICM UCCX/IPIVR premium licenses. I used the excellent article by Gergely (https://supportforums.cisco.com/document/97736/uccx-8x-really-simple-soap-client-no-custom-jar) with success. Thank you.
    In playing around, I found one of the free web services to use to send the SOAP request and receive a response. After much poking around I finally got something to work and got data successfully. From one of the services I used (cydne.com) I was able to get a response XML file, parse the response data and separate it into the various variables I created to receive the data. No problems there.
    However, when I used the service www.webservicex.net, the resulting XML response doesn't have < and > in many of the fields. Instead, it has &lt; and &gt;. I figured I could just do a string replace and replace the &lt; with < and &gt; with >. After I got the response in the soapResponseString variable, I did a Do statement to replace the string &lt; with < and &gt; with >.
    Do:
    soapResponseString = soapResponseString.replace("&lt;","<");
    soapResponseString = soapResponseString.replace("&gt;",">");
    The substitution looked fine and the strings were replaced appropriately. However, when I did create XML document step using (Document)soapResponseString for some reason instead of the string showing TEXT[soapResponseString text goes here] it shows as §com.cisco.wf.steps.io.XMLDocument§com.cisco.wf.steps.io.XMLDocument@0§ . Then, the Get XML Document Data step fails with:
    XML Parser Exception: Nested exception is:
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed; nested exception is:
    com.cisco.wf.steps.io.SAXIOException: XML Parse exception; nested exception is:
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL] is not allowed.
    The replace does something to the soapResonseString string the Create XML Doucment step [(Document)soapResponseString] doesn't like for some reason and I can't figure out what. I don't need the data from the web service for anything other than testing to verify I can successfully get SOAP data. I'm wondering what the string replacement step does to the original string causing the parsing error. It's not apparently obvious what, if anything, changed.
    I attached a text document with the soapResponseString before string replacement, the Document soapResponseDocument before the replacement, the soapResponseString after replacement and the Document soapResponseDocument after replacement.
    Any insight would be appreciated.
    Bill

    Bill,
    could you please post the WSDL of the webservicex.net service you're trying to use? Is it "Global Weather"?
    If so, I took a look at the request/response pair and the XML they're sending is valid. But it's a bit different from what I am able to see in the text attachment posted by you.
    This is the request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
       <soapenv:Header/>
       <soapenv:Body>
          <web:GetWeather>
             <!--Optional:-->
             <web:CityName>Wien</web:CityName>
             <!--Optional:-->
             <web:CountryName>Austria</web:CountryName>
          </web:GetWeather>
       </soapenv:Body>
    </soapenv:Envelope>
    And this is the response:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <GetWeatherResponse xmlns="http://www.webserviceX.NET">
             <GetWeatherResult><![CDATA[<?xml version="1.0" encoding="utf-16"?>
    <CurrentWeather>
      <Location>Wien / Schwechat-Flughafen, Austria (LOWW) 48-07N 016-34E 190M</Location>
      <Time>Dec 19, 2014 - 12:50 AM EST / 2014.12.19 0550 UTC</Time>
      <Wind> from the W (270 degrees) at 16 MPH (14 KT) (direction variable):0</Wind>
      <Visibility> greater than 7 mile(s):0</Visibility>
      <SkyConditions> partly cloudy</SkyConditions>
      <Temperature> 57 F (14 C)</Temperature>
      <DewPoint> 44 F (7 C)</DewPoint>
      <RelativeHumidity> 62%</RelativeHumidity>
      <Pressure> 30.00 in. Hg (1016 hPa)</Pressure>
      <Status>Success</Status>
    </CurrentWeather>]]></GetWeatherResult>
          </GetWeatherResponse>
       </soap:Body>
    </soap:Envelope>
    Now what we can see here is perfectly legal, however, a sane person would never do this (I mean embedding a complete XML (with a header) into an XML. I mean, you can do that with enclosing the embedded XML with a CDATA tag, but again, the XML parser needs to take extra care and the programmer of the web service data consuming application needs to make extra effort to parse this.
    This is an exception to the rule I guess so it can be safely ignored.
    Anyway, can you double check the response string. Or, actually, would you mind posting your script?
    G.

Maybe you are looking for

  • How to fix your iPod if it can't be mounted or recognized

    Unless the iPod's HD is dead and damaged, it can be fixed by doing a Restore but how about it cannot be mounted or recognized by the computer and the window of the iPod updater will show a grey box of "RESTORE" and not allow you to click it. Recently

  • Photo sync problem with Windows Vista?

    I did some searching and was wondering if there is a solution to the photo sync problem with Windows Vista. I have gone the route of changing some of my photos to bitmap files but this is was way too much work just to view on ipod. I like to email Ap

  • Digital Sigunature in WD Abap .

    hi Guru, i want to implement the Server side Digital Sigunature in WD Abap . Can u guess help me in this senario. Is there any Blog available.Can u explain How to  do that? Advance Thanx, Regards Vivekananthan.S

  • I want to visit your company for studying.

    Hi, my name is Bae Gi Woong. I am a student from KAIST(Korea Advanced Institute of Science and Technology), Korea. I am interested in UI(User Interface) and Multi Touch System. There is a global education program which supports students who want to v

  • Making a forum in dreamweaver.

    I am trying to make a forum script in dreamweaver. I know it is possible because someone i know did it. Is there any tutorials on how to make a forum with dreamweaver? I am stuck.