The Wayback Machine - https://web.archive.org/web/20090205122255/http://www.codeproject.com:80/script/Forums/View.aspx?fid=3421
Click here to Skip to main content
5,862,551 members and growing! (17,900 online)
Announcements
* Bold indicates new messages since 2:22 5 Feb '09




BullFrog Power
Advanced Search
Sitemap

XML / XSL


Home > Forums > XML / XSL

 Msgs 1 to 25 of 172 (Total in Forum: 5,614) (Refresh)FirstPrevNext
QuestionRecommed XML EditormemberDon Burton12hrs 47mins ago 
Hello all,

I'm looking to buy a good XML Editor/Studio. I've looked at Liquid XML. Any alternatives I should review?

Thanks.
Questionjavascript and xmlmemberreta.me17hrs 38mins ago 
hello every body
i need a help ..any information can help
i want to ask how can i create desktop application using combination of javascript and xml
like www.klipfolio.com ..they have feeds reader ..its light desktop application and have amazing interface..if u want u can download this feed reader its 1 mega or more ..
please some body help me
how can i develop desktop application using both xml and javascript
best regards
QuestionDom JavaScript..NamespacememberAmr M. K.22hrs 51mins ago 

Dear,
I am using control ntb combo
http://www.nitobi.com/products/completeui/demos/explorer/[^]

the control to use
-Namespace <html xmlns:ntb>
-javaScript files

control render Browser
<ntb:Combo TABINDEX=0 id="H_MasterAppId_22_0_" InitialSearch="zzz__is__50" Mode="classic" OnSelectEvent="ValidationAjax('H_MasterAppId_22_0_','1000001','change')" >
<ntb:ComboTextBox width=245px OnEditKeyUpEvent="ifEmptyRepopulate(this)" DataFieldIndex=1></ntb:ComboTextBox>
<ntb:ComboList OnHideEvent="TextboxSetSelection('H_MasterAppId_22_0_');" OnAfterSearchEvent="TextboxSetInitialValue('H_MasterAppId_22_0_');" height=200 width=748px
DatasourceUrl="b6fm/getData.asp?tr=203&viewid=0&req=0" PageSize="50" >
<ntb:ComboColumnDefinition width=120px HeaderLabel="Caption" DataFieldIndex=1>
</ntb:ComboColumnDefinition>
<ntb:ComboColumnDefinition width=120px HeaderLabel="Id" DataFieldIndex=0>
</ntb:ComboColumnDefinition></ntb:ComboList></ntb:Combo></span><span id="R" name="RR" Style="color:Red; display :none " > Required Feild</span></td></tr><tr><td class="MDcaption" >Details Application</td><td class="MControl" ><ntb:Combo TABINDEX=0 id="H_DetailsAppId_22_0_" InitialSearch="zzz__is__90300" Mode="classic" >
<ntb:ComboTextBox width=245px OnEditKeyUpEvent="ifEmptyRepopulate(this)" DataFieldIndex=1></ntb:ComboTextBox>
<ntb:ComboList OnHideEvent="TextboxSetSelection('H_DetailsAppId_22_0_');" OnAfterSearchEvent="TextboxSetInitialValue('H_DetailsAppId_22_0_');" height=200 width=748px
DatasourceUrl="b6fm/getData.asp?tr=203&viewid=0&req=0" PageSize="50" >
<ntb:ComboColumnDefinition width=120px HeaderLabel="Caption" DataFieldIndex=1>
</ntb:ComboColumnDefinition>
<ntb:ComboColumnDefinition width=120px HeaderLabel="Id" DataFieldIndex=0>
</ntb:ComboColumnDefinition></ntb:ComboList></ntb:Combo>


I want to create control Dynamicly using innerHTML Property of JavaScript

var sq=String.fromCharCode(39);
var comboName;
comboName='vComboTest';
var txt;
txt = '<ntb:Combo xmlns:ntb TABINDEX=4 id="' + comboName + '" Mode="classic" theme="outlook" >';
txt = txt + '<ntb:ComboTextBox width=245px OnEditKeyUpEvent="ifEmptyRepopulate(this)" DataFieldIndex=1></ntb:ComboTextBox>'
txt = txt + '<ntb:ComboList OnHideEvent="TextboxSetSelection(' + sq + comboName + sq + ');" height=200 width=766px DatasourceUrl="b6fm/getData.asp?tr=51&viewid=0&req=0" PageSize="50">';
txt = txt + '<ntb:ComboColumnDefinition width=240px HeaderLabel="Display Name" DataFieldIndex=1>';
txt = txt + '</ntb:ComboColumnDefinition><ntb:ComboColumnDefinition width=180px HeaderLabel="First Name" DataFieldIndex=2>';
txt = txt + '</ntb:ComboColumnDefinition><ntb:ComboColumnDefinition width=180px HeaderLabel="Last Name" DataFieldIndex=3>';
txt= txt+ '</ntb:ComboColumnDefinition><ntb:ComboColumnDefinition width=132px HeaderLabel="User Id" DataFieldIndex=0>';
txt = txt + '</ntb:ComboColumnDefinition></ntb:ComboList></ntb:Combo>';

tdNode.innerHTML=txt ;//tdNode is created dynamcily I dont have problem in it

when I want to inizle control give error,I notice that tag in tdNode is missed up
render somethiing like this
***
<ntb:Combo id="S_lockUpTest_33_0_11_" Mode="classic" theme="outlook" ></ntb:Combo>
<ntb:ComboTextBox width="245px" OnEditKeyUpEvent="ifEmptyRepopulate(this)" DataFieldIndex="1"></ntb:ComboTextBox>
<ntb:ComboList OnHideEvent="TextboxSetSelection('S_lockUpTest_33_0_11_');" height="200" width="766px" DatasourceUrl="b6fm/getData.asp?tr=50&viewid=0&req=0" PageSize="50">
</ntb:ComboList>
<ntb:ComboColumnDefinition width="150px" HeaderLabel="Caption" DataFieldIndex="1" ></ntb:ComboColumnDefinition>
<ntb:ComboColumnDefinition width="150px" HeaderLabel="ID" DataFieldIndex="0" ></ntb:ComboColumnDefinition>


**
<ntb:ComboTextBox width="245px" OnEditKeyUpEvent="ifEmptyRepopulate(this)" DataFieldIndex="1"></ntb:ComboTextBox>
<ntb:ComboList OnHideEvent="TextboxSetSelection('S_lockUpTest_33_0_11_');" height="200" width="766px" DatasourceUrl="b6fm/getData.asp?tr=50&viewid=0&req=0" PageSize="50">
<ntb:ComboColumnDefinition width="150px" HeaderLabel="Caption" DataFieldIndex="1" ></ntb:ComboColumnDefinition>
<ntb:ComboColumnDefinition width="150px" HeaderLabel="ID" DataFieldIndex="0" ></ntb:ComboColumnDefinition>
</ntb:ComboList>
</ntb:Combo>

Not same that I wrote in javaScript but this some exmple
why Structure of text when i wrote in td changed and sometimes missed upConfusedConfused

Regards


note:I will post question in Html form too

Yes. CreatiVity withOuT limiTs
QuestionNeed some tips on designing my XMLmemberbenjamin yap5:40 3 Feb '09  
Hi, i wanna to design my XML format for Purchase Order

A purchase order consists of

• Purchase Order number
• Purchase Order date
• Seller ID
• Buyer ID
• Shipping address
• List of items with quantities and prices (productID, qty)
• Notes and special instructions


How should i design my XML format?

I tried this. But i wonder how do i add my items in.. coz there can be a quite items in a purchase order







AnswerRe: Need some tips on designing my XMLmemberJon Rista18hrs 41mins ago 
Here is one suggestion...however there are many possabilities:

<purchaseOrder number="PO12345" date="2/2/2008">
      <seller id="1" />
      <buyer id="2" />

      <addresses>
            <address type="shipping">
                  <street1>This is the street address</street1>
                  <street2>Suite 100</street2>
                  <city>Some City</city>
                  <state>A state code</state>
                  <country>USA</country>
                  <postalCode>12345-6789</postalCode>
            </address>
      </addresses>

      <items>
            <item productID="123" price="10.95" quantity="5" />
            <item productID="456" price="89.45" quantity="1" />
      </items>

      <notes>This is a note.</notes>
      <instructions>Here are some special instructions.</instructions>
</purchaseOrder>
QuestionselectNode returns 0 if XML contains '&' [modified]memberArindam Tewary22:31 1 Feb '09  
If I have a XML like this which I am loading into javascript using DomDocument object. Please note that this XML is having an "ampersand".


<DataSet>
<Row>
<NDOCUMENTID>499</NDOCUMENTID>
<TDESCRIPTION>my &amp; god</TDESCRIPTION>
<TDISPLAYNAME>my god</TDISPLAYNAME>
<TTITLE>my god</TTITLE>
<NPARENT_DOC_ID>0</NPARENT_DOC_ID>
<NPARENT_FOLDER_ID>496</NPARENT_FOLDER_ID>
</Row>
<Row>
<NDOCUMENTID>501</NDOCUMENTID>
<TDESCRIPTION>Level 2Folder</TDESCRIPTION>
<TDISPLAYNAME>Level 2Folder</TDISPLAYNAME>
<TTITLE>Level 2Folder</TTITLE>
<NPARENT_DOC_ID>0</NPARENT_DOC_ID>
<NPARENT_FOLDER_ID>500</NPARENT_FOLDER_ID>
</Row>
</DataSet>


After loading into javascript DomDocument object selectNodes() returns 0.



var objXML = new ActiveXObject("MSXML2.DomDocument");
. . . . // some code to load the above XML into objXML
objFolderNodes = objXML.selectNodes("//DataSet/Row[NPARENT_FOLDER_ID = '496']");

alert("objFolderNodes.length :"+objFolderNodes.length);



Please note that if I remove the '&', above code working fine.

Any help is appreciated. Thanks in advance.

Thanks,
Arindam D Tewary

modified on Monday, February 2, 2009 3:37 AM

AnswerRe: selectNode returns 0 if XML contains '&'mvpled mike20hrs 8mins ago 
I did not verified this but my memory is that an entity is required for that character to be handled correctly by parsers etc.

http://www.google.com/#hl=en&q;=xml+entity&btnG;=Google+Search&aq;=f&oq;=xml+entity&fp;=3WTwdsC3GPc[^]
QuestionHow to use createdocumentfragment(.NET) function to add a document fragment containing namespace prefix?membercool_mars5:09 29 Jan '09  
<report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<body>
<reportitems>
         <textbox name="textbox1">
            <rd:defaultname>textbox1</rd:defaultname>
            <visibility>
               <hidden>true</hidden>
            </visibility>
            <top>2.75in</top>
            <width>1in</width>
            <style>
               <paddingleft>2pt</paddingleft>
               <paddingright>2pt</paddingright>
               <paddingtop>2pt</paddingtop>
               <paddingbottom>2pt</paddingbottom>
            </style>
            <zindex>3</zindex>
            <cangrow>true</cangrow>
            <left>4.75in</left>
            <height>1.125in</height>
            <value>tttttttttttttttttttttttttttttttttttttttttttt</value>
         </textbox>
   </reportitems>
</body>
   <language>en-US</language>
   <topmargin>1in</topmargin>
</report>


I have a xml document like this, when i tried to use createdocumentfragment() to add another textbox node

<textbox name="textbox2">
            <rd:defaultname xmlns:rd="#unknown">textbox2</rd:defaultname>
            <visibility>
               <hidden>true</hidden>
            </visibility>
            <top>2.75in</top>
            <width>1in</width>
            <style>
               <paddingleft>2pt</paddingleft>
               <paddingright>2pt</paddingright>
               <paddingtop>2pt</paddingtop>
               <paddingbottom>2pt</paddingbottom>
            </style>
            <zindex>3</zindex>
            <cangrow>true</cangrow>
            <left>4.75in</left>
            <height>1.125in</height>
            <value>ssssssssssssssssssssssssssssssssss</value>
         </textbox>
since there is a <rd:defaultname xmlns:rd="#unknown"></rd:defaultname>, I get an error saying rd namespace not declared.

Anyone has some idea about it?

Thanks in advance!

Ricky
AnswerRe: How to use createdocumentfragment(.NET) function to add a document fragment containing namespace prefix? [modified]memberGeorge L. Jackson9:50 30 Jan '09  
As far as I know, you have to repeat the explicit declarations in the document fragment:
<textbox xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" name="textbox2">
<rd:defaultname xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">textbox2</rd:defaultname>
<visibility>
<hidden>true</hidden>
</visibility>
<top>2.75in</top>
<width>1in</width>
<style>
<paddingleft>2pt</paddingleft>
<paddingright>2pt</paddingright>
<paddingtop>2pt</paddingtop>
<paddingbottom>2pt</paddingbottom>
</style>
<zindex>3</zindex>
<cangrow>true</cangrow>
<left>4.75in</left>
<height>1.125in</height>
<value>ssssssssssssssssssssssssssssssssss</value>
</textbox>


"We make a living by what we get, we make a life by what we give." --Winston Churchill

modified on Friday, January 30, 2009 3:03 PM

Questionusing intellisense in XSLT editor in VS2008memberMember 19799653:50 29 Jan '09  
Greetings!

I would like to use XSLT for ASP server control generation, but when I try to get asp namespace in editor I'm not getting and intellisense for asp controls.

what url should I use for xmlns:asp to get it working?

thanks!
QuestionNot getting ANY help from this site on XSLTmembercrystal91544:56 28 Jan '09  
I'll make this simple:

Here's my XML input:

<a>
<b>123</b>
<c>234</c>
<d>
<e id="c" />
<f id="a" />
</d>
</a>

I want this as output: (note all is same but e & f id's are alpha sorted

<a>
<b>123</b>
<c>234</c>
<d>
<f id="a" />
<e id="c" />
</d>
</a>
AnswerRe: Not getting ANY help from this site on XSLTmvpled mike5:39 28 Jan '09  
crystal9154 wrote:
Not getting ANY help from this site on XSLT

crystal9154 wrote:
Could someone kindly offer me the correct xslt code


I'm sorry no one has offered to do your work for you, no really, I am. Dead
GeneralRe: Not getting ANY help from this site on XSLTmembercrystal91545:57 28 Jan '09  
bite me, no life
GeneralRe: Not getting ANY help from this site on XSLTmvpled mike6:00 28 Jan '09  
f*** off a**hole
GeneralRe: Not getting ANY help from this site on XSLTmembercrystal91546:13 28 Jan '09  
see thread above
GeneralRe: Not getting ANY help from this site on XSLTmvpled mike6:22 28 Jan '09  
no, I really meant it, f*** off. Besides since you can't get your job done, how do you have the time to post your useless insults to me on the internet? Ah, maybe we are on to something here. :~
GeneralRe: Not getting ANY help from this site on XSLTmembercrystal91546:46 28 Jan '09  
obviously you possess zero life
GeneralRe: Not getting ANY help from this site on XSLTmembercrystal91546:59 28 Jan '09  
hey sh-t for brains, led mike
i solved the problem myself so thanks for being an a-hole.
hey read your bio,
at least understanding your an a-hole is step 1 to recovery
buh bye
GeneralRe: Not getting ANY help from this site on XSLTmvpled mike7:08 28 Jan '09  
crystal9154 wrote:
thanks for being an a-hole


No problem. Post some useless jackass questions anytime you want some more. I'm here all week.

crystal9154 wrote:
i solved the problem myself


Imagine that! What a novel idea! Are you sure that's what you are getting paid for though, I mean if they really want you to get other people to do your work using internet forums then perhaps you should have waited until someone provided you the code.
GeneralRe: Not getting ANY help from this site on XSLTmemberindian1437:41 30 Jan '09  
Hi Friend,

May be u r true but still but if u want to take help from others u should have patience. That we all should realize.

Thanks,
Aleem Mohammad.

Thanks & Regards,

Md. Abdul Aleem
NIIT technologies

Questionxslt: sort xml by child attribute and copy to new xmlmembercrystal915414:46 26 Jan '09  
Could someone kindly offer me the correct xslt code to sort by factoryNum and copy to new xml, retaining all elements and attributes from original XML? Thanks in advance

'******************************
Here's my code but not working:
'******************************

                  Dim xslt As String =
                     "<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>" & _
                     "<xsl:template match='winelist'>" & _
                     "<xsl:for-each select='wine/winery'>" & _
                     "<xsl:sort select='@factoryNum' order='descending' data-type='number'/>" & _
                     "<xsl:copy-of select='.'/>" & _
                     "</xsl:for-each>" & _
                     "</xsl:template>" & _
                     "</xsl:stylesheet>"

'****************************
Here's my source xml:
'****************************

<?xml version="1.0" encoding="utf-16"?>
<winelist>
   <wine>
         <winery factoryNum="2">Lindeman's</winery>
         <product>Bin 65</product>
         <year>1998</year>
         <prices>
            <list>6.99</list>
            <discounted>5.99</discounted>
            <case>71.50</case>
         </prices>
   </wine>
   <wine>
         <winery factoryNum="1">Benziger</winery>
         <product>Carneros</product>
         <year>1997</year>
         <prices>
            <list>10.99</list>
            <discounted>9.50</discounted>
            <case>114.00</case>
         </prices>
   </wine>
   <wine>
         <winery factoryNum="4">Kendall Jackson</winery>
         <product>Vintner's Reserve</product>
         <year>1998</year>
         <prices>
            <list>12.50</list>
            <discounted>9.99</discounted>
            <case>115.00</case>
         </prices>
   </wine>
   <wine>
         <winery factoryNum="3">Duckpond</winery>
         <product>Merit Selection</product>
         <year>1996</year>
         <prices>
            <list>13.99</list>
            <discounted>11.99</discounted>
            <case>143.50</case>
         </prices>
   </wine>
</winelist>
AnswerRe: xslt: sort xml by child attribute and copy to new xmlmemberGeorge L. Jackson7:02 28 Jan '09  
Demanding help and insulting members who volunteer their expert assistance is pitiful!

As far as your problem is concerned, I would place the result of the sorted nodes in a variable. Then, I would copy the sorted nodes in the variable.

"We make a living by what we get, we make a life by what we give." --Winston Churchill

QuestionHow do I read this XML file?memberMaWeRic23:59 25 Jan '09  
I have an XML file looking like this (just an example):

<?xml version="1.0" encoding="UTF-8" ?>
<family>
<name xmlns="http://www.opentrans.org/XMLSchema/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" type="standard">
<firstname>Tom</firstname>
<lastname>Smith</lastname>
</name>
<name xmlns="http://www.opentrans.org/XMLSchema/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" type="standard">
<firstname>Dale</firstname>
<lastname>Smith</lastname>
</name>
</family>


I can read up the document as a XMLDocument and navigate through SelctNodes if the Namespace attribute is not present. I have understood that I need to specify some kind of namespace using a namespace manager.

This is my code so far :

'Create objcts
Dim m_xmld As XmlDocument
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode
'Create the XML Document
m_xmld = New XmlDocument()
'Load the Xml file
m_xmld.Load("D:\family.xml")
'Get the list of name nodes
m_nodelist = m_xmld.SelectNodes("/family/name")
'How many nodes
msgbox(m_nodelist.count)


Anyone can fill in the missing parts for me? C# or VB.NET .. doesn't matter Big Grin

Regards // M
AnswerRe: How do I read this XML file?mvpled mike5:49 26 Jan '09  
They hide that information in the documention[^]

Don't cross post.
GeneralOk fine .. Now how do I make a SelectSingleNode among the childs?memberMaWeRic6:36 28 Jan '09  
I used the link and could get all my orders suing namespace. Under each namespace there is a lot of elements like and others.

I loop through my orders without problems.

But how do I select a child to a node using namespace? releative XPath in other words.

My code now look like this:

'Objects()
Dim XDoc As New XmlDocument
Dim Orders As XmlNodeList

'Try to read doc
XDoc.Load(ImportFile)

'Create an XmlNamespaceManager for resolving namespaces.
Dim XN As XmlNamespaceManager = New XmlNamespaceManager(XDoc.NameTable)
XN.AddNamespace("Order", "http://www.opentrans.org/XMLSchema/1.0")

'Get Orders from XML
Orders = XDoc.SelectNodes("//Order:ORDER", XN)

For Each Order As XmlNode In Orders
dim MyOrderId as string = Orders.SelectSingleNode("ORDER_ID",XN).innerText
next




That doesn't work if I want the OrderID.

If I use


Order.SelectSingleNode("/Order:ORDER_DATE", XN)


I get the first OrderID each time.

Ideas?

//M

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Last Updated 9 Aug 2007
Web18 | Advertise | Privacy
Copyright © CodeProject, 1999-2009
All Rights Reserved. Terms of Use