Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

XML

20K

Solutions

13K

Contributors

Extensible Markup Language (XML) refers to the encoding of documents such that they can be read by both machines and humans. XML documents use tags to show the beginning and end of a set of data. XML is used extensively on websites to show volumes of data, and is the default for a number of office productivity suites. This topic includes discussions of XML-related technologies, such as XQuery (the XML Query language), XPath (the XML Path language), XSLT (eXtensible Stylesheet Language Transformations), XLink (the XML Linking language) and XPointer (the XML Pointer language).

Share tech news, updates, or what's on your mind.

Sign up to Post

Hello:

We have an XML file that we would like to open in Excel.  We have tried two methods.  Both have failed.

First, we tried opening Excel, browsing out to the file, and simply opening the file.  But, upon trying to do so and using one of the suggested methods, we get an error saying "cannot load the specified XML".

Also, we have tried opening the XML file by opening Excel, choosing "Data", "Get Data", "From File", and "From XML", we get the error message "XML processing failed...Data at the root level is invalid".

How can we, then, open an XML file in Excel?

Thank you!

John
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Example contrived for this question.  I am following a tutorial in .NET for the  Datacontract XML serialization and deserialization.  I created an interface, a base class for serialization.

public interface ISerializer {
        string Serialize(object obj, Type objType);
        object Desrialize(string serializedData, Type objType);
    }

 public abstract class Serializer : ISerializer {
        public string Serialize(object obj, Type objType) {
            MemoryStream ms = new MemoryStream();
            DataContractSerializer ser = new DataContractSerializer(objType);

            ser.WriteObject(ms, obj);

            ms.Position = 0;

            return new StreamReader(ms).ReadToEnd();
        }

        public object Deserialize(string serializedData, Type objType) {
                   //code to deserialize
        }
    }

and for now, I have a XmlDataContractSerializer class, which uses base classes implementation for serializing data.

public class XmlDataContractSerializer : Serializer {
}

I used XSD tool to generate a class from an XSD file - sample below

using System.Xml.Serialization;
// This source code was auto-generated by xsd, Version=4.6.1055.0.
namespace SampleProject {

        /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
        [System.SerializableAttribute()]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        …
0
I need a better understanding of the relationship between SAML and API integrations.

Our company has two major needs :

(1) single sign-on (user 'Bob' will login into 'ACME.com' and then click a link to automatically enter our site without login again)
(2) transfer of information - one of our tools will send an XML string to company X, they will run a program and return an XML string to us with additional information.   Currently this is done through a web service (API).   Not sure how to better secure this? Does SAML come into play here?

I see how SAML will be used for (1) the single sign-on.   But is SAML used for, or needed for an API when passing XML strings?   We currently use SOAP or just XML.  

Please let me understand how SAML, SOAP and web services all play together.
If I were to approach a new company with the idea of creating a web service to communicate, would they ask me to use SAML?
0
0
hello everyone i create one app.config file store in appsettings multiple username and password ?how can i store ? i just see in appsettings key and value and mention also key=username and value=some-pcusername or but i didn't get anything.
                    foreach (var key in appSettings.AllKeys)
                    {
                       //here i want to code with help of storing username and passowrd in appsettings i want to get information of that system
                    }
thank you !
0
I am trying to get XML validation working for a SOAP server but I've run into a couple of issues.

XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://p2p.thalesgroup.com/wsdl/status/xsd"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified"
  attributeFormDefault="qualified"
  targetNamespace="http://p2p.thalesgroup.com/wsdl/status/xsd">
 
  <xsd:element name="Alive">
    <xsd:complexType>
      <xsd:annotation>
        <xsd:documentation>
          - Alive is sent periodically to verify the connection status
        </xsd:documentation>
      </xsd:annotation>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

Open in new window


XML:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap-enc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Body><Alive/></soap:Body>
</soap:Envelope>

Open in new window


First Issue:
SOAP elements are not being recognized.
Validator Output: Cannot Find The Declaration Of Element 'soap:Envelope'., Line '1', Column '225'.
I found a Stack Overflow thread describing the same issue but the described solutions do not work for me.

Second Issue:
Even if I remove the SOAP elements, I still have a namespace issue.
Validator Output: Cannot Find The Declaration Of Element 'Event'., Line '1', Column '8'.
0
How I can show soap XML data as text in HTML5? Pre do not work anymore. I think?
0
Hello,
I want to show database text in my website but this text is a XML file structure. The browser shows this text as part of html.
How I can show this string as real text? So also <> nodes will shown as text?
0
I need a way of looping through an XML document and obtaining values using VB.net for the following: PHYSICALADDRESS:Street; PHYSICALADDRESS:city; PHYSICALADDRESS:state;TAXID:SSN;DOB:dob. I would like these values in seperate string variable so I can use later. See the attached XML document.
EX_sample_XML.txt
0
Hi I want to search the xml files like windows search option not with file name ,its is with xmls inner content as you know that window can allow us to search the  file with its inner content as well by putting the value in the search bar

Than need to copy the filtered file name in one variable using script

Any one can help
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Importing XML files created everyday within a folder and subfolder created at 4:00 PM everyday Mon-Fri, within the folder is an XML file  with name convention exported 4:03PM which will need to be loaded to SQL table

 folder path : Z:\background-processarea\Outbound
 Subfolders Paths:
                                      Name                                                            DateModified                               Type
Z:\background-processarea\Outbound\BGP_1413656            1/8/2018 4:00PM                     File folder      
            Xx exported                                                                           1/8/2018 4:03PM                       XML
            Xx recorder-BGP-out-210307                                             1/8/2018 4:00PM                       XML  
Z:\background-processarea\Outbound\BGP_1412472            1/5/2018 7:00PM                     File folder
          Xx exported                                                                           1/8/2018 4:03PM                         XML
          Xx recorder-BGP-out-207020                                             1/8/2018 4:00PM                         XML  
Z:\background-processarea\Outbound\BGP_1412471            1/5/2018 4:00PM                     File folder
            Xx exported                                                                           1/8/2018 4:03PM                       XML
            Xx recorder-BGP-out-206848          …
0
I have to take 2 million rows from a Sql server table (extracting 20 fields from table )  and create XML in a predefined format .

Sql Server table has sample fields like ( ALL ARE STRING)
     ID , Name, Discipline, Asset, category ,CreationDate

 XML has to be created in some format which later need to be "loaded" into another SQL Database ( A software will read the XML and create Sql instruction to insert rows into a normalised database)

Category entries need to be validated against a picklist
The XML will have attributes like EquipName ( Which maps to Name in the input  databse ) ,  DocCreationDate ( The date conversion rule has to be applied here)
...... And more fields and rules

Any thoughts on how to handle this ? I am thinking of writing a .net utility for this . I have no working knowledge on ETL. But an open source free  ETL is good for this ?  

Any thoughts on a high level design of the utility  for this ? Especially considering the 2 million rows
0
Hi

I have a xml file and I need to sort some of the elements in it and can't figure out how to do it.

My structure is

<job>
      <OUTCOND NAME="AAP10151_AAP10221_AAP10151_AAP10122" ODATE="ODAT" SIGN="-"/>
      <OUTCOND NAME="AAP10151_AAP10224_AAP10151_AAP10122" ODATE="ODAT" SIGN="-"/>
      <OUTCOND NAME="AAP10151_AAP10223_AAP10151_AAP10122" ODATE="ODAT" SIGN="-"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10151_AAB10021" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10151_AAP10931" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10151_AA020931" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10181_AAP10181" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_SINGLES_CY300035" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_LP408397_LP408725" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10151_AAB10021" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10151_AAP10931" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10151_AA020931" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10181_AAP10181" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_SINGLES_CY300035" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_LP408397_LP408725" ODATE="ODAT" SIGN="+"/>
      <OUTCOND NAME="AAP10151_AAP10122_AAP10151_AAB10021" ODATE="ODAT" SIGN="+"/>
      <OUTCOND …
0
Hi Experts,

I need to merge two xml files, having lack of experience with xml I am struggling here.

I have two xml files. One is original file and second xml file contains new updates to be made in original xml.

This is the original file. file1.xml

Now I have a new xml which contains new update to be done in first xml, please check file2.xml

Now I want to update first xml with the changes available in second xml, so the final xml should look like,
Output.xml

So basically my second xml contains only the changes to be added/ updated in original xml. I believe this should be easy for an expert. (By mistake I types hard earlier :)
Your help here is really appreciated.

Thanks
0
How can I get the value statically only for first time and combine with XML node index iteration for RML Mapping(RDF)?
Here is an example,
<Message>
<Header>
         <Graph>54127</Graph>
</Header>
<Customers>
        <customer>
              <indication>1</indication>
              <name>customer1</name>
       </customer>
      <customer>
              <indication>2</indication>
              <name>customer2</name>
       </customer>
</Customers>
</Message>

now I want to combine graph value with an indication for RML mapping to generate the unique index.
for example, i need a combination like  (Graph value 54127 + indication value 1) so final output 541271
please give your kind suggestions.
0
We have a number of XML files that we have created Excel import templates for to extract specific fields. We have at least half a dozen users who have been upgraded to Windows 10, and NONE of us can now refresh these files. The process still works on computers that remain on Windows 7. We have a Windows 7 computer that is providing a temporary respite, but we need to get this problem resolved for the Windows 10 units. Any suggestions welcome. We know there is nothing wrong with the XML files as they still import fine on the Windows 7 boxes.
0
I want to generate RML file From XML.
Input data in XML format
and output as RDF RML File.
Input:
<Events> ...
 <Exhibition id="398">
 <Venue>STAM</Venue>
  <Location>
   <lat>51.076891</lat>
   <long>3.717222</long>
  </Location>
 </Exhibition> ...
</Events>

Output:

<#EventsMapping>
  rml:logicalSource [
    rml:source "http://ex.com/events.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/Events/Exhibition" ];

  rr:subjectMap [
    rr:template "http://ex.com/{@id}" ];
 
rr:predicateObjectMap [
    rr:predicate ex:location;
    rr:objectMap [
      rr:parentTriplesMap <#LocationMapping> ] ].

give me your kind suggestions for generating RML file from XML data and if possible suggest in java for the library if available.
Also, Suggestions accepted.
0
I created Java client codes using wsimport tool. I think I got this exception when generated code try to parse response
com.sun.xml.internal.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://v.com/sc/bb/bos}cbo_v1Response but found: {null}cbo_v1Response
      at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:203)
      at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:211)
      at com.sun.xml.internal.ws.client.sei.ResponseBuilder$RpcLit.readResponse(ResponseBuilder.java:630)
      at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:110)
      at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
      at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
      at com.sun.proxy.$Proxy21.cbo(Unknown Source)
      at com.mypn.Myservice.runTransaction(Myservice.java:168)
      at com.mypn.Myservice.run(Myservice.java:132)
      at com.mypn.Myservice.main(Myservice.java:33)

I got response message using JAXB and everthing is okay except that xmlns="" part is empty.
<cbo_v1Response xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="">

I have tested my client code on SoapUI and if i add value to xmlns tag that expected, it works fine

I am not able to change service response messages so do you know how to simply handle this exception.

Thanks.
0
Hello, I trying to get and populating items from my dreamfactory Api.
If i get the url and api key on the browser i see a JSON but when i do a client.ExecuteAsync<ListItems>(request,(response) => {Console.WriteLine(response.Content)});
I saw i retrieving a xml ... really confusing
I try a lot samples from RestSharp, Xamarin TodoRest samples ,... no one works and i thing probably is because i still without be sure about if is XML or JSON ... someone was work before with dreamfactory api and xamarin forms for cross-platform api ?
Will be really helpful if someone can advice me about whats happend.
0
Become an Android App Developer
LVL 11
Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

I found this piece of code, but as I occupy it in my code, since I need to convert my xml file to base64 and then send it to be consumed by a web service.

Dim stream As NotesStream
Set stream = session.CreateStream	
Dim body As NotesMimeEntity

session.ConvertMIME = False

Call stream.WriteText(textToWrite)
Set body = doc.CreateMIMEEntity
Call body.SetContentFromText(stream, "", ENC_NONE)
Call body.EncodeContent(ENC_BASE64)

content = body.ContentAsText

Open in new window


And to send to consume the Web Service I found this piece of code ...

Sub Initialize
    Dim xmlhttp As Variant
    dim DOMDocument As Variant
    Dim soapEnvelope As String
    Dim webService As String
    dim username As String
    Dim password As String
    Dim strxml As String

    Set xmlhttp = CreateObject("Msxml2.XMLHTTP")
    Set DOMDocument = CreateObject("MSXML2.DOMDocument")

    webService = "http://server/path/service"

    username = "user1"
    password = "123456"

    soapEnvelope ={<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:doc="http://checkYourOwnEnvelopeDetails.com">}
    soapEnvelope =soapEnvelope & {<soap:Header/>}
    soapEnvelope =soapEnvelope & {<soap:Body>}

    ' ...use SoapUI to know the exact envelop structure

    soapEnvelope =soapEnvelope & {</soap:Body>}
    soapEnvelope =soapEnvelope & {</soap:Envelope>}

    DOMDocument.loadXML (soapEnvelope)

    Call xmlhttp.open("POST", webService, False,username,password)
    Call 

Open in new window

0
I'm trying to run a Credit Report using Trans Union REST API with C# code. I installed a digital certificate on my machine today. I think that went OK. But I'm not sure if I need to open our firewall to certain IP address, or if I need to list my IP address with the certificate. And, I'm also not sure what the URI is for the API. The only URI I see for testing is https://netaccess-test.transunion.com. But, I would expect that the API would be a bit longer.

For this question, if you use the Trans Union API, any help that moves me in the right direction would get at least some credit as an answer.
0
I'm trying to connect data as I have in Excel 2013 but get this error message in Excel 2016:

"Query results cannot overlap a table or XML Mapping. Please select another destination."

Does anyone know how I can get around this?
0
using jquery, how can i code in loop? I just do not want to use like find("state") loop.
I just want to loop inside of the children regardless what it is because i may add more like
<substate>

<xml>
<county>
<state abbr="CA" Id="1">California</state>
<state abbr="FL" id="2">Texas</state>
</county>
</xml>

Open in new window

0
I have my developers told me that it is impossible to use jquery (as front end) to update/modify XML (in the same directory/path)?
Is it correct?

If it is not correct, can you show me some sample that is working?

Thanks
0
First let me say that I am very new to SSIS and XML.........I have created a SSIS package that takes XML data in (it contains main data, and some attachment data), splits this data and puts it into Excel files, picture is attached.  During this processing it places the main data in one table, and the attachment data in another table. The 'separation' table contains a Guidid, SSN, claimeffdate, claimnum, lastname, firstname, middleinitial, suffix and some other information.  The attachments table comes in with a description, type of document, unique attachment id, actionable attachment, attachmentsize and the attachmentdata.

As I am transforming this data, I need to put the GUIDID on the SQL table with the attachment data.  I have two people with attachments, and the other 4 do not have attachments.  I'm using a query that runs before and after the 'Shred and Stage in my foreach loop container that is like:
declare @ID as decimal(38,0)

set @ID = (Select Top 1 StateGUID from SIDES.dbo.StateSeparationInformation order by StateGuid desc)

update sides.dbo.[INC-Attachment]
set StateGUID = @ID
where StateGUID is null


The query executes fine, and the first person gets the correct GUID on all their attachments.  The second person that should get a GUID for an attachment does not instead the GUID for another person gets  put on that attachment.

The query works great if everyone has attachments, just not when some have attachments and some do not.

I added it …
0

XML

20K

Solutions

13K

Contributors

Extensible Markup Language (XML) refers to the encoding of documents such that they can be read by both machines and humans. XML documents use tags to show the beginning and end of a set of data. XML is used extensively on websites to show volumes of data, and is the default for a number of office productivity suites. This topic includes discussions of XML-related technologies, such as XQuery (the XML Query language), XPath (the XML Path language), XSLT (eXtensible Stylesheet Language Transformations), XLink (the XML Linking language) and XPointer (the XML Pointer language).